<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: drawtext.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a03224.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">结构体</a> &#124;
<a href="#define-members">宏定义</a> &#124;
<a href="#typedef-members">类型定义</a> &#124;
<a href="#func-members">函数</a> &#124;
<a href="#var-members">变量</a>  </div>
  <div class="headertitle">
<div class="title">rtl/drawtext.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="a03224_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
结构体</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03025.html">DRAWTEXTDATA</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:a876ce77f3c672c7162658151e648389e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a876ce77f3c672c7162658151e648389e">CR</a>&#160;&#160;&#160;13</td></tr>
<tr class="separator:a876ce77f3c672c7162658151e648389e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a350c9d6cb81908d59427ee96844d1a9c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a350c9d6cb81908d59427ee96844d1a9c">LF</a>&#160;&#160;&#160;10</td></tr>
<tr class="separator:a350c9d6cb81908d59427ee96844d1a9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab132e22217cfdd047e85f4650e851147"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#ab132e22217cfdd047e85f4650e851147">DT_HFMTMASK</a>&#160;&#160;&#160;0x03</td></tr>
<tr class="separator:ab132e22217cfdd047e85f4650e851147"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51bb95844094a47a8b877c21c4201ca9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a51bb95844094a47a8b877c21c4201ca9">DT_VFMTMASK</a>&#160;&#160;&#160;0x0C</td></tr>
<tr class="separator:a51bb95844094a47a8b877c21c4201ca9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57dd80bb1a5e8bb32f70db45260736d4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a57dd80bb1a5e8bb32f70db45260736d4">ETO_OPAQUEFGND</a>&#160;&#160;&#160;0x0A</td></tr>
<tr class="separator:a57dd80bb1a5e8bb32f70db45260736d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f90df0386382ac0cd9b7849cd91e0ec"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a0f90df0386382ac0cd9b7849cd91e0ec">CCHELLIPSIS</a>&#160;&#160;&#160;(sizeof(<a class="el" href="a03224.html#a0f3be14607d7bb854fd013841856ebc5">szEllipsis</a>)/sizeof(WCHAR) - 1)</td></tr>
<tr class="separator:a0f90df0386382ac0cd9b7849cd91e0ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb629223ee858bf3b4cf3b7b31d1f931"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#adb629223ee858bf3b4cf3b7b31d1f931">MAXBUFFSIZE</a>&#160;&#160;&#160;128</td></tr>
<tr class="separator:adb629223ee858bf3b4cf3b7b31d1f931"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
类型定义</h2></td></tr>
<tr class="memitem:af62cc60e4e13ee2561c02fc3a68fda26"><td class="memItemLeft" align="right" valign="top">typedef void(FAR *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#af62cc60e4e13ee2561c02fc3a68fda26">LPFNTEXTDRAW</a>) (HDC, int, int, LPWSTR, int)</td></tr>
<tr class="separator:af62cc60e4e13ee2561c02fc3a68fda26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb5bdb8d54a29d011af789fac970c7f3"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="a03025.html">DRAWTEXTDATA</a> FAR *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a></td></tr>
<tr class="separator:aeb5bdb8d54a29d011af789fac970c7f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a17ac4a763de37779b30785dfab165bd3"><td class="memItemLeft" align="right" valign="top">LPCWSTR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a17ac4a763de37779b30785dfab165bd3">GetNextWordbreak</a> (<a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dwCodePage, LPCWSTR lpch, LPCWSTR lpchEnd, BOOL fBreakSpace)</td></tr>
<tr class="separator:a17ac4a763de37779b30785dfab165bd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7eb24aded300703b63d9542295f214f"><td class="memItemLeft" align="right" valign="top">LONG&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#af7eb24aded300703b63d9542295f214f">GetPrefixCount</a> (LPCWSTR lpstr, int cch, LPWSTR lpstrCopy, int charcopycount)</td></tr>
<tr class="separator:af7eb24aded300703b63d9542295f214f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e04593ff1f3b6675984ed4fa4b27f43"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a4e04593ff1f3b6675984ed4fa4b27f43">DT_GetExtentMinusPrefixes</a> (HDC hdc, LPCWSTR lpchStr, int cchCount, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFormat, int iOverhang)</td></tr>
<tr class="separator:a4e04593ff1f3b6675984ed4fa4b27f43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05adba5e1573b32335f8496037f88441"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a05adba5e1573b32335f8496037f88441">DT_DrawStr</a> (HDC hdc, int xLeft, int yTop, LPCWSTR lpchStr, int cchCount, BOOL fDraw, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFormat, <a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a> lpDrawInfo)</td></tr>
<tr class="separator:a05adba5e1573b32335f8496037f88441"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7072070208c274ab4d8612e98cdb297d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a7072070208c274ab4d8612e98cdb297d">DT_DrawJustifiedLine</a> (HDC hdc, int yTop, LPCWSTR lpchLineSt, int cchCount, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFormat, <a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a> lpDrawInfo)</td></tr>
<tr class="separator:a7072070208c274ab4d8612e98cdb297d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02d920d30320f1aa0e9ef66ef1fc6117"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a02d920d30320f1aa0e9ef66ef1fc6117">DT_InitDrawTextInfo</a> (HDC hdc, LPRECT lprc, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFormat, <a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a> lpDrawInfo, LPDRAWTEXTPARAMS lpDTparams)</td></tr>
<tr class="separator:a02d920d30320f1aa0e9ef66ef1fc6117"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afaad18d6511aeb4e5f0f2e6b9db4bdea"><td class="memItemLeft" align="right" valign="top">LPCWSTR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#afaad18d6511aeb4e5f0f2e6b9db4bdea">DT_AdjustWhiteSpaces</a> (LPCWSTR lpStNext, LPINT lpiCount, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFormat)</td></tr>
<tr class="separator:afaad18d6511aeb4e5f0f2e6b9db4bdea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a372cd9491d5e2afd7f98e57f68dfd905"><td class="memItemLeft" align="right" valign="top">LPCWSTR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a372cd9491d5e2afd7f98e57f68dfd905">DT_BreakAWord</a> (HDC hdc, LPCWSTR lpchText, int iLength, int iWidth, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFormat, int iOverhang)</td></tr>
<tr class="separator:a372cd9491d5e2afd7f98e57f68dfd905"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44d8495062e6993b1d8061e8cfa5488d"><td class="memItemLeft" align="right" valign="top">LPWSTR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a44d8495062e6993b1d8061e8cfa5488d">DT_GetLineBreak</a> (HDC hdc, LPCWSTR lpchLineStart, int cchCount, <a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dwFormat, LPINT lpiLineLength, <a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a> lpDrawInfo)</td></tr>
<tr class="separator:a44d8495062e6993b1d8061e8cfa5488d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed2de8c9634b17416e68c4fda014df94"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#aed2de8c9634b17416e68c4fda014df94">NeedsEndEllipsis</a> (HDC hdc, LPCWSTR lpchText, LPINT lpCount, <a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a> lpDTdata, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFormat)</td></tr>
<tr class="separator:aed2de8c9634b17416e68c4fda014df94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a0321e98ac1eef74c1fc4d7b0ecc269"><td class="memItemLeft" align="right" valign="top">LPWSTR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a2a0321e98ac1eef74c1fc4d7b0ecc269">PathFindFileName</a> (LPCWSTR pPath, int cchText)</td></tr>
<tr class="separator:a2a0321e98ac1eef74c1fc4d7b0ecc269"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a903d0804dbfff266d1210cdcd9a91b07"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a903d0804dbfff266d1210cdcd9a91b07">AddPathEllipsis</a> (HDC hDC, LPWSTR lpszPath, int cchText, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFormat, int cxMaxWidth, int iOverhang)</td></tr>
<tr class="separator:a903d0804dbfff266d1210cdcd9a91b07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4eec820aaba00887637766df1ebccbd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#ac4eec820aaba00887637766df1ebccbd">AddEllipsisAndDrawLine</a> (HDC hdc, int yLine, LPCWSTR lpchText, int cchText, <a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dwDTformat, <a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a> lpDrawInfo)</td></tr>
<tr class="separator:ac4eec820aaba00887637766df1ebccbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa0bd210bb187c340bf41cbc9f4df839"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#afa0bd210bb187c340bf41cbc9f4df839">DrawTextExW</a> (HDC hdc, LPWSTR lpchText, int cchText, LPRECT lprc, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> dwDTformat, LPDRAWTEXTPARAMS lpDTparams)</td></tr>
<tr class="separator:afa0bd210bb187c340bf41cbc9f4df839"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa31ce455c47e43d3d4cb796dc59e47d5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#aa31ce455c47e43d3d4cb796dc59e47d5">PSMTextOut</a> (HDC hdc, int xLeft, int yTop, LPWSTR lpsz, int cch)</td></tr>
<tr class="separator:aa31ce455c47e43d3d4cb796dc59e47d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb66e3ffa3f7a55c481165ca226efa3e"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#adb66e3ffa3f7a55c481165ca226efa3e">IsSysFontAndDefaultMode</a> (HDC hdc)</td></tr>
<tr class="separator:adb66e3ffa3f7a55c481165ca226efa3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
变量</h2></td></tr>
<tr class="memitem:a0f3be14607d7bb854fd013841856ebc5"><td class="memItemLeft" align="right" valign="top">static WCHAR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03224.html#a0f3be14607d7bb854fd013841856ebc5">szEllipsis</a> [] = TEXT(&quot;...&quot;)</td></tr>
<tr class="separator:a0f3be14607d7bb854fd013841856ebc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">宏定义说明</h2>
<a id="a0f90df0386382ac0cd9b7849cd91e0ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f90df0386382ac0cd9b7849cd91e0ec">&#9670;&nbsp;</a></span>CCHELLIPSIS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CCHELLIPSIS&#160;&#160;&#160;(sizeof(<a class="el" href="a03224.html#a0f3be14607d7bb854fd013841856ebc5">szEllipsis</a>)/sizeof(WCHAR) - 1)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00049">49</a> 行定义.</p>

</div>
</div>
<a id="a876ce77f3c672c7162658151e648389e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a876ce77f3c672c7162658151e648389e">&#9670;&nbsp;</a></span>CR</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CR&#160;&#160;&#160;13</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00016">16</a> 行定义.</p>

</div>
</div>
<a id="ab132e22217cfdd047e85f4650e851147"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab132e22217cfdd047e85f4650e851147">&#9670;&nbsp;</a></span>DT_HFMTMASK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DT_HFMTMASK&#160;&#160;&#160;0x03</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00018">18</a> 行定义.</p>

</div>
</div>
<a id="a51bb95844094a47a8b877c21c4201ca9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51bb95844094a47a8b877c21c4201ca9">&#9670;&nbsp;</a></span>DT_VFMTMASK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DT_VFMTMASK&#160;&#160;&#160;0x0C</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00019">19</a> 行定义.</p>

</div>
</div>
<a id="a57dd80bb1a5e8bb32f70db45260736d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57dd80bb1a5e8bb32f70db45260736d4">&#9670;&nbsp;</a></span>ETO_OPAQUEFGND</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ETO_OPAQUEFGND&#160;&#160;&#160;0x0A</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00020">20</a> 行定义.</p>

</div>
</div>
<a id="a350c9d6cb81908d59427ee96844d1a9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a350c9d6cb81908d59427ee96844d1a9c">&#9670;&nbsp;</a></span>LF</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LF&#160;&#160;&#160;10</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00017">17</a> 行定义.</p>

</div>
</div>
<a id="adb629223ee858bf3b4cf3b7b31d1f931"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb629223ee858bf3b4cf3b7b31d1f931">&#9670;&nbsp;</a></span>MAXBUFFSIZE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAXBUFFSIZE&#160;&#160;&#160;128</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00057">57</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">类型定义说明</h2>
<a id="aeb5bdb8d54a29d011af789fac970c7f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb5bdb8d54a29d011af789fac970c7f3">&#9670;&nbsp;</a></span>LPDRAWTEXTDATA</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="a03025.html">DRAWTEXTDATA</a> FAR* <a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00044">44</a> 行定义.</p>

</div>
</div>
<a id="af62cc60e4e13ee2561c02fc3a68fda26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af62cc60e4e13ee2561c02fc3a68fda26">&#9670;&nbsp;</a></span>LPFNTEXTDRAW</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(FAR * LPFNTEXTDRAW) (HDC, int, int, LPWSTR, int)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00027">27</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="ac4eec820aaba00887637766df1ebccbd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4eec820aaba00887637766df1ebccbd">&#9670;&nbsp;</a></span>AddEllipsisAndDrawLine()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AddEllipsisAndDrawLine </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hdc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>yLine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpchText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cchText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>&#160;</td>
          <td class="paramname"><em>dwDTformat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a>&#160;</td>
          <td class="paramname"><em>lpDrawInfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l01492">1492</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>&#160;{</div>
<div class="line"><a name="l01500"></a><span class="lineno"> 1500</span>&#160;    LPWSTR pEllipsis = NULL;</div>
<div class="line"><a name="l01501"></a><span class="lineno"> 1501</span>&#160;    WCHAR  szTempBuff[<a class="code" href="a03224.html#adb629223ee858bf3b4cf3b7b31d1f931">MAXBUFFSIZE</a>];</div>
<div class="line"><a name="l01502"></a><span class="lineno"> 1502</span>&#160;    LPWSTR lpDest;</div>
<div class="line"><a name="l01503"></a><span class="lineno"> 1503</span>&#160;    BOOL   fAlreadyCopied = FALSE;</div>
<div class="line"><a name="l01504"></a><span class="lineno"> 1504</span>&#160; </div>
<div class="line"><a name="l01505"></a><span class="lineno"> 1505</span>&#160;    <span class="comment">// Check if this is a filename with a path AND</span></div>
<div class="line"><a name="l01506"></a><span class="lineno"> 1506</span>&#160;    <span class="comment">// Check if the width is too narrow to hold all the text.</span></div>
<div class="line"><a name="l01507"></a><span class="lineno"> 1507</span>&#160;    <span class="keywordflow">if</span>((dwDTformat &amp; DT_PATH_ELLIPSIS) &amp;&amp;</div>
<div class="line"><a name="l01508"></a><span class="lineno"> 1508</span>&#160;        ((<a class="code" href="a03224.html#a4e04593ff1f3b6675984ed4fa4b27f43">DT_GetExtentMinusPrefixes</a>(hdc, lpchText, cchText,</div>
<div class="line"><a name="l01509"></a><span class="lineno"> 1509</span>&#160;                   dwDTformat, lpDrawInfo-&gt;cxOverhang)) &gt; lpDrawInfo-&gt;cxMaxWidth)) {</div>
<div class="line"><a name="l01510"></a><span class="lineno"> 1510</span>&#160;        <span class="comment">// We need to add Path-Ellipsis. See if we can do it in-place.</span></div>
<div class="line"><a name="l01511"></a><span class="lineno"> 1511</span>&#160;        <span class="keywordflow">if</span>(!(dwDTformat &amp; DT_MODIFYSTRING)) {</div>
<div class="line"><a name="l01512"></a><span class="lineno"> 1512</span>&#160;            <span class="comment">// NOTE: When you add Path-Ellipsis, the string could grow by</span></div>
<div class="line"><a name="l01513"></a><span class="lineno"> 1513</span>&#160;            <span class="comment">// CCHELLIPSIS bytes.</span></div>
<div class="line"><a name="l01514"></a><span class="lineno"> 1514</span>&#160;            <span class="keywordflow">if</span>((cchText + <a class="code" href="a03224.html#a0f90df0386382ac0cd9b7849cd91e0ec">CCHELLIPSIS</a> + 1) &lt;= <a class="code" href="a03224.html#adb629223ee858bf3b4cf3b7b31d1f931">MAXBUFFSIZE</a>)</div>
<div class="line"><a name="l01515"></a><span class="lineno"> 1515</span>&#160;                lpDest = szTempBuff;</div>
<div class="line"><a name="l01516"></a><span class="lineno"> 1516</span>&#160;            <span class="keywordflow">else</span> {   <span class="comment">// Alloc from local heap.</span></div>
<div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>&#160;                <span class="comment">// Alloc the buffer from local heap.</span></div>
<div class="line"><a name="l01518"></a><span class="lineno"> 1518</span>&#160;                <span class="keywordflow">if</span>(!(pEllipsis = (LPWSTR)<a class="code" href="a00035.html#aa4c5df31e4454c1b801c9cc8dc49ed7f">UserRtlAllocMem</a>(</div>
<div class="line"><a name="l01519"></a><span class="lineno"> 1519</span>&#160;                        (cchText+<a class="code" href="a03224.html#a0f90df0386382ac0cd9b7849cd91e0ec">CCHELLIPSIS</a>+1)*<span class="keyword">sizeof</span>(WCHAR))))</div>
<div class="line"><a name="l01520"></a><span class="lineno"> 1520</span>&#160;                    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01521"></a><span class="lineno"> 1521</span>&#160;                lpDest = (LPWSTR)pEllipsis;</div>
<div class="line"><a name="l01522"></a><span class="lineno"> 1522</span>&#160;            }</div>
<div class="line"><a name="l01523"></a><span class="lineno"> 1523</span>&#160;            <span class="comment">// Source String may not be NULL terminated. So, copy just</span></div>
<div class="line"><a name="l01524"></a><span class="lineno"> 1524</span>&#160;            <span class="comment">// the given number of characters.</span></div>
<div class="line"><a name="l01525"></a><span class="lineno"> 1525</span>&#160;            RtlCopyMemory(lpDest, lpchText, cchText*<span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l01526"></a><span class="lineno"> 1526</span>&#160;            lpchText = lpDest;        <span class="comment">// lpchText points to the copied buff.</span></div>
<div class="line"><a name="l01527"></a><span class="lineno"> 1527</span>&#160;            fAlreadyCopied = TRUE;    <span class="comment">// Local copy has been made.</span></div>
<div class="line"><a name="l01528"></a><span class="lineno"> 1528</span>&#160;        }</div>
<div class="line"><a name="l01529"></a><span class="lineno"> 1529</span>&#160;        <span class="comment">// Add the path ellipsis now!</span></div>
<div class="line"><a name="l01530"></a><span class="lineno"> 1530</span>&#160;        cchText = <a class="code" href="a03224.html#a903d0804dbfff266d1210cdcd9a91b07">AddPathEllipsis</a>(hdc, (LPWSTR)lpchText, cchText, dwDTformat,</div>
<div class="line"><a name="l01531"></a><span class="lineno"> 1531</span>&#160;            lpDrawInfo-&gt;cxMaxWidth, lpDrawInfo-&gt;cxOverhang);</div>
<div class="line"><a name="l01532"></a><span class="lineno"> 1532</span>&#160;    }</div>
<div class="line"><a name="l01533"></a><span class="lineno"> 1533</span>&#160; </div>
<div class="line"><a name="l01534"></a><span class="lineno"> 1534</span>&#160;    <span class="comment">// Check if end-ellipsis are to be added.</span></div>
<div class="line"><a name="l01535"></a><span class="lineno"> 1535</span>&#160;    <span class="keywordflow">if</span>((dwDTformat &amp; (DT_END_ELLIPSIS | DT_WORD_ELLIPSIS)) &amp;&amp;</div>
<div class="line"><a name="l01536"></a><span class="lineno"> 1536</span>&#160;        <a class="code" href="a03224.html#aed2de8c9634b17416e68c4fda014df94">NeedsEndEllipsis</a>(hdc, lpchText, &amp;cchText, lpDrawInfo, dwDTformat)) {</div>
<div class="line"><a name="l01537"></a><span class="lineno"> 1537</span>&#160;        <span class="comment">// We need to add end-ellipsis; See if we can do it in-place.</span></div>
<div class="line"><a name="l01538"></a><span class="lineno"> 1538</span>&#160;        <span class="keywordflow">if</span>((!(dwDTformat &amp; DT_MODIFYSTRING)) &amp;&amp; (!fAlreadyCopied))   {</div>
<div class="line"><a name="l01539"></a><span class="lineno"> 1539</span>&#160;            <span class="comment">// See if the string is small enough for the buff on stack.</span></div>
<div class="line"><a name="l01540"></a><span class="lineno"> 1540</span>&#160;            <span class="keywordflow">if</span>((cchText+<a class="code" href="a03224.html#a0f90df0386382ac0cd9b7849cd91e0ec">CCHELLIPSIS</a>+1) &lt;= <a class="code" href="a03224.html#adb629223ee858bf3b4cf3b7b31d1f931">MAXBUFFSIZE</a>)</div>
<div class="line"><a name="l01541"></a><span class="lineno"> 1541</span>&#160;                lpDest = szTempBuff;  <span class="comment">// If so, use it.</span></div>
<div class="line"><a name="l01542"></a><span class="lineno"> 1542</span>&#160;            <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01543"></a><span class="lineno"> 1543</span>&#160;                <span class="comment">// Alloc the buffer from local heap.</span></div>
<div class="line"><a name="l01544"></a><span class="lineno"> 1544</span>&#160;                <span class="keywordflow">if</span>(!(pEllipsis = (LPWSTR)<a class="code" href="a00035.html#aa4c5df31e4454c1b801c9cc8dc49ed7f">UserRtlAllocMem</a>(</div>
<div class="line"><a name="l01545"></a><span class="lineno"> 1545</span>&#160;                        (cchText+<a class="code" href="a03224.html#a0f90df0386382ac0cd9b7849cd91e0ec">CCHELLIPSIS</a>+1)*<span class="keyword">sizeof</span>(WCHAR))))</div>
<div class="line"><a name="l01546"></a><span class="lineno"> 1546</span>&#160;                    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01547"></a><span class="lineno"> 1547</span>&#160;                lpDest = pEllipsis;</div>
<div class="line"><a name="l01548"></a><span class="lineno"> 1548</span>&#160;            }</div>
<div class="line"><a name="l01549"></a><span class="lineno"> 1549</span>&#160;            <span class="comment">// Make a copy of the string in the local buff.</span></div>
<div class="line"><a name="l01550"></a><span class="lineno"> 1550</span>&#160;<span class="comment">//          LCopyStruct(lpchText, lpDest, cchText);</span></div>
<div class="line"><a name="l01551"></a><span class="lineno"> 1551</span>&#160;            RtlCopyMemory(lpDest, lpchText, cchText*<span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l01552"></a><span class="lineno"> 1552</span>&#160;            lpchText = lpDest;</div>
<div class="line"><a name="l01553"></a><span class="lineno"> 1553</span>&#160;        }</div>
<div class="line"><a name="l01554"></a><span class="lineno"> 1554</span>&#160;        <span class="comment">// Add an end-ellipsis at the proper place.</span></div>
<div class="line"><a name="l01555"></a><span class="lineno"> 1555</span>&#160;        wcscpy((LPWSTR)(lpchText+cchText), <a class="code" href="a03224.html#a0f3be14607d7bb854fd013841856ebc5">szEllipsis</a>);</div>
<div class="line"><a name="l01556"></a><span class="lineno"> 1556</span>&#160;        cchText = wcslen(lpchText);</div>
<div class="line"><a name="l01557"></a><span class="lineno"> 1557</span>&#160;    }</div>
<div class="line"><a name="l01558"></a><span class="lineno"> 1558</span>&#160; </div>
<div class="line"><a name="l01559"></a><span class="lineno"> 1559</span>&#160;    <span class="comment">// Draw the line that we just formed.</span></div>
<div class="line"><a name="l01560"></a><span class="lineno"> 1560</span>&#160;    <a class="code" href="a03224.html#a7072070208c274ab4d8612e98cdb297d">DT_DrawJustifiedLine</a>(hdc, yLine, lpchText, cchText, dwDTformat, lpDrawInfo);</div>
<div class="line"><a name="l01561"></a><span class="lineno"> 1561</span>&#160; </div>
<div class="line"><a name="l01562"></a><span class="lineno"> 1562</span>&#160;    <span class="comment">// Free the block allocated for End-Ellipsis.</span></div>
<div class="line"><a name="l01563"></a><span class="lineno"> 1563</span>&#160;    <span class="keywordflow">if</span>(pEllipsis)</div>
<div class="line"><a name="l01564"></a><span class="lineno"> 1564</span>&#160;        <a class="code" href="a00035.html#a11e5f86f5ec24b989012a66ead19ac73">UserRtlFreeMem</a>(pEllipsis);</div>
<div class="line"><a name="l01565"></a><span class="lineno"> 1565</span>&#160; </div>
<div class="line"><a name="l01566"></a><span class="lineno"> 1566</span>&#160;    <span class="keywordflow">return</span> cchText;</div>
<div class="line"><a name="l01567"></a><span class="lineno"> 1567</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l01420">AddPathEllipsis()</a>, <a class="el" href="a03224_source.html#l00049">CCHELLIPSIS</a>, <a class="el" href="a03224_source.html#l00960">DT_DrawJustifiedLine()</a>, <a class="el" href="a03224_source.html#l00866">DT_GetExtentMinusPrefixes()</a>, <a class="el" href="a03224_source.html#l00057">MAXBUFFSIZE</a>, <a class="el" href="a03224_source.html#l01311">NeedsEndEllipsis()</a>, <a class="el" href="a03224_source.html#l00046">szEllipsis</a>, <a class="el" href="a00035_source.html#l01064">UserRtlAllocMem()</a> , 以及 <a class="el" href="a00035_source.html#l01070">UserRtlFreeMem()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01575">DrawTextExW()</a>.</p>

</div>
</div>
<a id="a903d0804dbfff266d1210cdcd9a91b07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a903d0804dbfff266d1210cdcd9a91b07">&#9670;&nbsp;</a></span>AddPathEllipsis()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AddPathEllipsis </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hDC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPWSTR&#160;</td>
          <td class="paramname"><em>lpszPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cchText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wFormat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cxMaxWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>iOverhang</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l01420">1420</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l01427"></a><span class="lineno"> 1427</span>&#160;{</div>
<div class="line"><a name="l01428"></a><span class="lineno"> 1428</span>&#160;  <span class="keywordtype">int</span>    iLen;</div>
<div class="line"><a name="l01429"></a><span class="lineno"> 1429</span>&#160;  <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>   dxFixed, dxEllipsis;</div>
<div class="line"><a name="l01430"></a><span class="lineno"> 1430</span>&#160;  LPWSTR lpEnd;          <span class="comment">/* end of the unfixed string */</span></div>
<div class="line"><a name="l01431"></a><span class="lineno"> 1431</span>&#160;  LPWSTR lpFixed;        <span class="comment">/* start of text that we always display */</span></div>
<div class="line"><a name="l01432"></a><span class="lineno"> 1432</span>&#160;  BOOL   bEllipsisIn;</div>
<div class="line"><a name="l01433"></a><span class="lineno"> 1433</span>&#160;  <span class="keywordtype">int</span>    iLenFixed;</div>
<div class="line"><a name="l01434"></a><span class="lineno"> 1434</span>&#160;  SIZE   size;</div>
<div class="line"><a name="l01435"></a><span class="lineno"> 1435</span>&#160; </div>
<div class="line"><a name="l01436"></a><span class="lineno"> 1436</span>&#160;  lpFixed = <a class="code" href="a03224.html#a2a0321e98ac1eef74c1fc4d7b0ecc269">PathFindFileName</a>(lpszPath, cchText);</div>
<div class="line"><a name="l01437"></a><span class="lineno"> 1437</span>&#160;  <span class="keywordflow">if</span> (lpFixed != lpszPath)</div>
<div class="line"><a name="l01438"></a><span class="lineno"> 1438</span>&#160;      lpFixed--;  <span class="comment">// point at the slash</span></div>
<div class="line"><a name="l01439"></a><span class="lineno"> 1439</span>&#160;  <span class="keywordflow">else</span></div>
<div class="line"><a name="l01440"></a><span class="lineno"> 1440</span>&#160;      <span class="keywordflow">return</span> cchText;</div>
<div class="line"><a name="l01441"></a><span class="lineno"> 1441</span>&#160; </div>
<div class="line"><a name="l01442"></a><span class="lineno"> 1442</span>&#160;  lpEnd = lpFixed;</div>
<div class="line"><a name="l01443"></a><span class="lineno"> 1443</span>&#160;  bEllipsisIn = FALSE;</div>
<div class="line"><a name="l01444"></a><span class="lineno"> 1444</span>&#160;  iLenFixed = cchText - (lpFixed - lpszPath);</div>
<div class="line"><a name="l01445"></a><span class="lineno"> 1445</span>&#160;  dxFixed = <a class="code" href="a03224.html#a4e04593ff1f3b6675984ed4fa4b27f43">DT_GetExtentMinusPrefixes</a>(hDC, lpFixed, iLenFixed, wFormat, iOverhang);</div>
<div class="line"><a name="l01446"></a><span class="lineno"> 1446</span>&#160; </div>
<div class="line"><a name="l01447"></a><span class="lineno"> 1447</span>&#160;  <span class="comment">// It is assumed that the &quot;...&quot; string does not have any prefixes (&#39;&amp;&#39;).</span></div>
<div class="line"><a name="l01448"></a><span class="lineno"> 1448</span>&#160;  UserGetTextExtentPointW(hDC, <a class="code" href="a03224.html#a0f3be14607d7bb854fd013841856ebc5">szEllipsis</a>, wcslen(<a class="code" href="a03224.html#a0f3be14607d7bb854fd013841856ebc5">szEllipsis</a>), &amp;size);</div>
<div class="line"><a name="l01449"></a><span class="lineno"> 1449</span>&#160;  dxEllipsis = size.cx - iOverhang;</div>
<div class="line"><a name="l01450"></a><span class="lineno"> 1450</span>&#160; </div>
<div class="line"><a name="l01451"></a><span class="lineno"> 1451</span>&#160;  <span class="keywordflow">while</span> (TRUE) {</div>
<div class="line"><a name="l01452"></a><span class="lineno"> 1452</span>&#160;      iLen = dxFixed + <a class="code" href="a03224.html#a4e04593ff1f3b6675984ed4fa4b27f43">DT_GetExtentMinusPrefixes</a>(hDC, lpszPath, ((PBYTE)lpEnd - (PBYTE)lpszPath)/<span class="keyword">sizeof</span>(WCHAR),</div>
<div class="line"><a name="l01453"></a><span class="lineno"> 1453</span>&#160;                                       wFormat, iOverhang) - iOverhang;</div>
<div class="line"><a name="l01454"></a><span class="lineno"> 1454</span>&#160; </div>
<div class="line"><a name="l01455"></a><span class="lineno"> 1455</span>&#160;      <span class="keywordflow">if</span> (bEllipsisIn)</div>
<div class="line"><a name="l01456"></a><span class="lineno"> 1456</span>&#160;          iLen += dxEllipsis;</div>
<div class="line"><a name="l01457"></a><span class="lineno"> 1457</span>&#160; </div>
<div class="line"><a name="l01458"></a><span class="lineno"> 1458</span>&#160;      <span class="keywordflow">if</span> (iLen &lt;= cxMaxWidth)</div>
<div class="line"><a name="l01459"></a><span class="lineno"> 1459</span>&#160;          <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01460"></a><span class="lineno"> 1460</span>&#160; </div>
<div class="line"><a name="l01461"></a><span class="lineno"> 1461</span>&#160;      bEllipsisIn = TRUE;</div>
<div class="line"><a name="l01462"></a><span class="lineno"> 1462</span>&#160; </div>
<div class="line"><a name="l01463"></a><span class="lineno"> 1463</span>&#160;      <span class="keywordflow">if</span> (lpEnd &lt;= lpszPath) {</div>
<div class="line"><a name="l01464"></a><span class="lineno"> 1464</span>&#160;          <span class="comment">/* Things didn&#39;t fit. */</span></div>
<div class="line"><a name="l01465"></a><span class="lineno"> 1465</span>&#160;          lpEnd = lpszPath;</div>
<div class="line"><a name="l01466"></a><span class="lineno"> 1466</span>&#160;          <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01467"></a><span class="lineno"> 1467</span>&#160;      }</div>
<div class="line"><a name="l01468"></a><span class="lineno"> 1468</span>&#160; </div>
<div class="line"><a name="l01469"></a><span class="lineno"> 1469</span>&#160;      <span class="comment">/* Step back a character. */</span></div>
<div class="line"><a name="l01470"></a><span class="lineno"> 1470</span>&#160;      lpEnd--;</div>
<div class="line"><a name="l01471"></a><span class="lineno"> 1471</span>&#160;  }</div>
<div class="line"><a name="l01472"></a><span class="lineno"> 1472</span>&#160; </div>
<div class="line"><a name="l01473"></a><span class="lineno"> 1473</span>&#160;  <span class="keywordflow">if</span> (bEllipsisIn &amp;&amp; (lpEnd + <a class="code" href="a03224.html#a0f90df0386382ac0cd9b7849cd91e0ec">CCHELLIPSIS</a> &lt; lpFixed)) {</div>
<div class="line"><a name="l01474"></a><span class="lineno"> 1474</span>&#160;      <span class="comment">// NOTE: the strings could over lap here. So, we use LCopyStruct.</span></div>
<div class="line"><a name="l01475"></a><span class="lineno"> 1475</span>&#160; </div>
<div class="line"><a name="l01476"></a><span class="lineno"> 1476</span>&#160;      RtlMoveMemory((lpEnd + <a class="code" href="a03224.html#a0f90df0386382ac0cd9b7849cd91e0ec">CCHELLIPSIS</a>), lpFixed, iLenFixed * <span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l01477"></a><span class="lineno"> 1477</span>&#160;      *(lpEnd+<a class="code" href="a03224.html#a0f90df0386382ac0cd9b7849cd91e0ec">CCHELLIPSIS</a>+iLenFixed) = TEXT(<span class="charliteral">&#39;\0&#39;</span>);</div>
<div class="line"><a name="l01478"></a><span class="lineno"> 1478</span>&#160;      RtlMoveMemory(lpEnd, <a class="code" href="a03224.html#a0f3be14607d7bb854fd013841856ebc5">szEllipsis</a>, wcslen(<a class="code" href="a03224.html#a0f3be14607d7bb854fd013841856ebc5">szEllipsis</a>)* <span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l01479"></a><span class="lineno"> 1479</span>&#160; </div>
<div class="line"><a name="l01480"></a><span class="lineno"> 1480</span>&#160;      cchText = (int)(lpEnd - lpszPath) + <a class="code" href="a03224.html#a0f90df0386382ac0cd9b7849cd91e0ec">CCHELLIPSIS</a> + iLenFixed;</div>
<div class="line"><a name="l01481"></a><span class="lineno"> 1481</span>&#160; </div>
<div class="line"><a name="l01482"></a><span class="lineno"> 1482</span>&#160;      <span class="comment">// now we can NULL terminate the string</span></div>
<div class="line"><a name="l01483"></a><span class="lineno"> 1483</span>&#160;      *(lpszPath + cchText) = TEXT(<span class="charliteral">&#39;\0&#39;</span>);</div>
<div class="line"><a name="l01484"></a><span class="lineno"> 1484</span>&#160;  }</div>
<div class="line"><a name="l01485"></a><span class="lineno"> 1485</span>&#160; </div>
<div class="line"><a name="l01486"></a><span class="lineno"> 1486</span>&#160;  <span class="keywordflow">return</span> cchText;</div>
<div class="line"><a name="l01487"></a><span class="lineno"> 1487</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l00049">CCHELLIPSIS</a>, <a class="el" href="a03224_source.html#l00866">DT_GetExtentMinusPrefixes()</a>, <a class="el" href="a03224_source.html#l01402">PathFindFileName()</a>, <a class="el" href="a03224_source.html#l00046">szEllipsis</a> , 以及 <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01492">AddEllipsisAndDrawLine()</a>.</p>

</div>
</div>
<a id="afa0bd210bb187c340bf41cbc9f4df839"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa0bd210bb187c340bf41cbc9f4df839">&#9670;&nbsp;</a></span>DrawTextExW()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int DrawTextExW </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hdc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPWSTR&#160;</td>
          <td class="paramname"><em>lpchText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cchText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPRECT&#160;</td>
          <td class="paramname"><em>lprc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>dwDTformat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPDRAWTEXTPARAMS&#160;</td>
          <td class="paramname"><em>lpDTparams</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l01575">1575</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l01582"></a><span class="lineno"> 1582</span>&#160;{</div>
<div class="line"><a name="l01583"></a><span class="lineno"> 1583</span>&#160;    <a class="code" href="a03025.html">DRAWTEXTDATA</a> DrawInfo;</div>
<div class="line"><a name="l01584"></a><span class="lineno"> 1584</span>&#160;    WORD         wFormat = LOWORD(dwDTformat);</div>
<div class="line"><a name="l01585"></a><span class="lineno"> 1585</span>&#160;    LPWSTR       lpchTextBegin;</div>
<div class="line"><a name="l01586"></a><span class="lineno"> 1586</span>&#160;    LPWSTR       lpchEnd;</div>
<div class="line"><a name="l01587"></a><span class="lineno"> 1587</span>&#160;    LPWSTR       lpchNextLineSt;</div>
<div class="line"><a name="l01588"></a><span class="lineno"> 1588</span>&#160;    <span class="keywordtype">int</span>          iLineLength;</div>
<div class="line"><a name="l01589"></a><span class="lineno"> 1589</span>&#160;    <span class="keywordtype">int</span>          iySign;</div>
<div class="line"><a name="l01590"></a><span class="lineno"> 1590</span>&#160;    <span class="keywordtype">int</span>          yLine;</div>
<div class="line"><a name="l01591"></a><span class="lineno"> 1591</span>&#160;    <span class="keywordtype">int</span>          yLastLineHeight;</div>
<div class="line"><a name="l01592"></a><span class="lineno"> 1592</span>&#160;    HRGN         hrgnClip;</div>
<div class="line"><a name="l01593"></a><span class="lineno"> 1593</span>&#160;    <span class="keywordtype">int</span>          iLineCount;</div>
<div class="line"><a name="l01594"></a><span class="lineno"> 1594</span>&#160;    RECT         rc;</div>
<div class="line"><a name="l01595"></a><span class="lineno"> 1595</span>&#160;    BOOL         fLastLine;</div>
<div class="line"><a name="l01596"></a><span class="lineno"> 1596</span>&#160;    WCHAR        ch;</div>
<div class="line"><a name="l01597"></a><span class="lineno"> 1597</span>&#160; </div>
<div class="line"><a name="l01598"></a><span class="lineno"> 1598</span>&#160;<span class="preprocessor">#ifdef DEBUG</span></div>
<div class="line"><a name="l01599"></a><span class="lineno"> 1599</span>&#160;    <span class="keywordflow">if</span> (dwDTformat &amp; ~DT_VALID)</div>
<div class="line"><a name="l01600"></a><span class="lineno"> 1600</span>&#160;        <a class="code" href="a00371.html#a01c4659626880ba56745765a3580a36b">RIPMSG0</a> (<a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>, <span class="stringliteral">&quot;DrawTextExW: Invalid dwDTformat flags&quot;</span>);</div>
<div class="line"><a name="l01601"></a><span class="lineno"> 1601</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01602"></a><span class="lineno"> 1602</span>&#160; </div>
<div class="line"><a name="l01603"></a><span class="lineno"> 1603</span>&#160;    <span class="keywordflow">if</span> (cchText == 0) {</div>
<div class="line"><a name="l01604"></a><span class="lineno"> 1604</span>&#160;        <span class="comment">/* Added by Chicago:</span></div>
<div class="line"><a name="l01605"></a><span class="lineno"> 1605</span>&#160;<span class="comment">         * Lotus Notes doesn&#39;t like getting a zero return here</span></div>
<div class="line"><a name="l01606"></a><span class="lineno"> 1606</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l01607"></a><span class="lineno"> 1607</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l01608"></a><span class="lineno"> 1608</span>&#160;    }</div>
<div class="line"><a name="l01609"></a><span class="lineno"> 1609</span>&#160; </div>
<div class="line"><a name="l01610"></a><span class="lineno"> 1610</span>&#160;    <span class="keywordflow">if</span> (cchText == -1)</div>
<div class="line"><a name="l01611"></a><span class="lineno"> 1611</span>&#160;        cchText = wcslen(lpchText);</div>
<div class="line"><a name="l01612"></a><span class="lineno"> 1612</span>&#160; </div>
<div class="line"><a name="l01613"></a><span class="lineno"> 1613</span>&#160; </div>
<div class="line"><a name="l01614"></a><span class="lineno"> 1614</span>&#160; </div>
<div class="line"><a name="l01615"></a><span class="lineno"> 1615</span>&#160;    <span class="keywordflow">if</span> ((lpDTparams) &amp;&amp; (lpDTparams-&gt;cbSize != <span class="keyword">sizeof</span>(DRAWTEXTPARAMS))) {</div>
<div class="line"><a name="l01616"></a><span class="lineno"> 1616</span>&#160;        <a class="code" href="a00371.html#adbdd8355d15a97b6f3a9e4766e6a2cc1">RIPERR1</a>(ERROR_INVALID_PARAMETER, <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>, <span class="stringliteral">&quot;DrawTextEx: cbSize %ld is invalid&quot;</span>,</div>
<div class="line"><a name="l01617"></a><span class="lineno"> 1617</span>&#160;                lpDTparams-&gt;cbSize);</div>
<div class="line"><a name="l01618"></a><span class="lineno"> 1618</span>&#160;        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01619"></a><span class="lineno"> 1619</span>&#160;    }</div>
<div class="line"><a name="l01620"></a><span class="lineno"> 1620</span>&#160; </div>
<div class="line"><a name="l01621"></a><span class="lineno"> 1621</span>&#160; </div>
<div class="line"><a name="l01622"></a><span class="lineno"> 1622</span>&#160;<span class="preprocessor">#ifdef LATER</span></div>
<div class="line"><a name="l01623"></a><span class="lineno"> 1623</span>&#160; </div>
<div class="line"><a name="l01624"></a><span class="lineno"> 1624</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01625"></a><span class="lineno"> 1625</span>&#160;<span class="comment">     * If DT_MODIFYSTRING is specified, then check for read-write pointer.</span></div>
<div class="line"><a name="l01626"></a><span class="lineno"> 1626</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01627"></a><span class="lineno"> 1627</span>&#160;    <span class="keywordflow">if</span> ((dwDTformat &amp; DT_MODIFYSTRING) &amp;&amp;</div>
<div class="line"><a name="l01628"></a><span class="lineno"> 1628</span>&#160;            (dwDTformat &amp; (DT_END_ELLIPSIS | DT_PATH_ELLIPSIS))) {</div>
<div class="line"><a name="l01629"></a><span class="lineno"> 1629</span>&#160;        <span class="keywordflow">if</span>(IsBadWritePtr(lpchText, cchText)) {</div>
<div class="line"><a name="l01630"></a><span class="lineno"> 1630</span>&#160;            <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_INVALID_PARAMETER, <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>, <span class="stringliteral">&quot;DrawTextEx: For DT_MODIFYSTRING, lpchText must be read-write&quot;</span>);</div>
<div class="line"><a name="l01631"></a><span class="lineno"> 1631</span>&#160;            <span class="keywordflow">return</span>(0);</div>
<div class="line"><a name="l01632"></a><span class="lineno"> 1632</span>&#160;        }</div>
<div class="line"><a name="l01633"></a><span class="lineno"> 1633</span>&#160;    }</div>
<div class="line"><a name="l01634"></a><span class="lineno"> 1634</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01635"></a><span class="lineno"> 1635</span>&#160; </div>
<div class="line"><a name="l01636"></a><span class="lineno"> 1636</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01637"></a><span class="lineno"> 1637</span>&#160;<span class="comment">     * Initialize the DrawInfo structure.</span></div>
<div class="line"><a name="l01638"></a><span class="lineno"> 1638</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01639"></a><span class="lineno"> 1639</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="a03224.html#a02d920d30320f1aa0e9ef66ef1fc6117">DT_InitDrawTextInfo</a>(hdc, lprc, wFormat, (<a class="code" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a>)&amp;DrawInfo, lpDTparams))</div>
<div class="line"><a name="l01640"></a><span class="lineno"> 1640</span>&#160;        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01641"></a><span class="lineno"> 1641</span>&#160; </div>
<div class="line"><a name="l01642"></a><span class="lineno"> 1642</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01643"></a><span class="lineno"> 1643</span>&#160;<span class="comment">     * If the rect is too narrow or the margins are too wide.....Just forget it!</span></div>
<div class="line"><a name="l01644"></a><span class="lineno"> 1644</span>&#160;<span class="comment">     *</span></div>
<div class="line"><a name="l01645"></a><span class="lineno"> 1645</span>&#160;<span class="comment">     * If wordbreak is specified, the MaxWidth must be a reasonable value.</span></div>
<div class="line"><a name="l01646"></a><span class="lineno"> 1646</span>&#160;<span class="comment">     * This check is sufficient because this will allow CALCRECT and NOCLIP</span></div>
<div class="line"><a name="l01647"></a><span class="lineno"> 1647</span>&#160;<span class="comment">     * cases.  --SANKAR.</span></div>
<div class="line"><a name="l01648"></a><span class="lineno"> 1648</span>&#160;<span class="comment">     *</span></div>
<div class="line"><a name="l01649"></a><span class="lineno"> 1649</span>&#160;<span class="comment">     * This also fixed all of our known problems with AppStudio.</span></div>
<div class="line"><a name="l01650"></a><span class="lineno"> 1650</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01651"></a><span class="lineno"> 1651</span>&#160;    <span class="keywordflow">if</span> (DrawInfo.cxMaxWidth &lt;= 0) {</div>
<div class="line"><a name="l01652"></a><span class="lineno"> 1652</span>&#160; </div>
<div class="line"><a name="l01653"></a><span class="lineno"> 1653</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l01654"></a><span class="lineno"> 1654</span>&#160;<span class="comment">         * We used to return a non-zero value in win31.</span></div>
<div class="line"><a name="l01655"></a><span class="lineno"> 1655</span>&#160;<span class="comment">         * If the kernel calls this we are always Ver 4.0 or above</span></div>
<div class="line"><a name="l01656"></a><span class="lineno"> 1656</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l01657"></a><span class="lineno"> 1657</span>&#160;<span class="preprocessor">#ifdef _USERK_</span></div>
<div class="line"><a name="l01658"></a><span class="lineno"> 1658</span>&#160;        <span class="keywordflow">if</span> (0) {</div>
<div class="line"><a name="l01659"></a><span class="lineno"> 1659</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01660"></a><span class="lineno"> 1660</span>&#160;        <span class="keywordflow">if</span> (GETAPPVER() &lt; VER40) {</div>
<div class="line"><a name="l01661"></a><span class="lineno"> 1661</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01662"></a><span class="lineno"> 1662</span>&#160;            <span class="keywordflow">if</span>((DrawInfo.cxMaxWidth == 0) &amp;&amp; !(wFormat &amp; DT_CALCRECT)) {</div>
<div class="line"><a name="l01663"></a><span class="lineno"> 1663</span>&#160;                <span class="keywordflow">return</span>(1);</div>
<div class="line"><a name="l01664"></a><span class="lineno"> 1664</span>&#160;            }</div>
<div class="line"><a name="l01665"></a><span class="lineno"> 1665</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01666"></a><span class="lineno"> 1666</span>&#160;            <span class="keywordflow">if</span> (wFormat &amp; DT_WORDBREAK) {</div>
<div class="line"><a name="l01667"></a><span class="lineno"> 1667</span>&#160;                <a class="code" href="a00371.html#a01c4659626880ba56745765a3580a36b">RIPMSG0</a> (<a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>, <span class="stringliteral">&quot;DrawTextExW: FAILURE DrawInfo.cxMaxWidth &lt;=0&quot;</span>);</div>
<div class="line"><a name="l01668"></a><span class="lineno"> 1668</span>&#160;                <span class="keywordflow">return</span> (1);</div>
<div class="line"><a name="l01669"></a><span class="lineno"> 1669</span>&#160;            }</div>
<div class="line"><a name="l01670"></a><span class="lineno"> 1670</span>&#160;        }</div>
<div class="line"><a name="l01671"></a><span class="lineno"> 1671</span>&#160;    }</div>
<div class="line"><a name="l01672"></a><span class="lineno"> 1672</span>&#160; </div>
<div class="line"><a name="l01673"></a><span class="lineno"> 1673</span>&#160;<span class="preprocessor">#ifdef LATER</span></div>
<div class="line"><a name="l01674"></a><span class="lineno"> 1674</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01675"></a><span class="lineno"> 1675</span>&#160;<span class="comment">     * if we&#39;re not doing the drawing, initialise the lpk-dll</span></div>
<div class="line"><a name="l01676"></a><span class="lineno"> 1676</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01677"></a><span class="lineno"> 1677</span>&#160;    <span class="keywordflow">if</span> (dwDTformat &amp; DT_RTLREADING)</div>
<div class="line"><a name="l01678"></a><span class="lineno"> 1678</span>&#160;        oldAlign = SetTextAlign(hdc, TA_RTLREADING | GetTextAlign(hdc));</div>
<div class="line"><a name="l01679"></a><span class="lineno"> 1679</span>&#160; </div>
<div class="line"><a name="l01680"></a><span class="lineno"> 1680</span>&#160;    <span class="keywordflow">if</span> (DrawInfo.bCharsetDll) {</div>
<div class="line"><a name="l01681"></a><span class="lineno"> 1681</span>&#160;        (*((LPFNDRAWTEXTCHARSET)DrawInfo.lpfnTextDraw))(hdc, 0, 0, lpchText,</div>
<div class="line"><a name="l01682"></a><span class="lineno"> 1682</span>&#160;                    cchText, FALSE, wFormat,</div>
<div class="line"><a name="l01683"></a><span class="lineno"> 1683</span>&#160;                    (<a class="code" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a>)&amp;DrawInfo, DT_CHARSETINIT);</div>
<div class="line"><a name="l01684"></a><span class="lineno"> 1684</span>&#160;    }</div>
<div class="line"><a name="l01685"></a><span class="lineno"> 1685</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01686"></a><span class="lineno"> 1686</span>&#160; </div>
<div class="line"><a name="l01687"></a><span class="lineno"> 1687</span>&#160; </div>
<div class="line"><a name="l01688"></a><span class="lineno"> 1688</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01689"></a><span class="lineno"> 1689</span>&#160;<span class="comment">     * If we need to clip, let us do that.</span></div>
<div class="line"><a name="l01690"></a><span class="lineno"> 1690</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01691"></a><span class="lineno"> 1691</span>&#160;    <span class="keywordflow">if</span> (!(wFormat &amp; DT_NOCLIP)) {</div>
<div class="line"><a name="l01692"></a><span class="lineno"> 1692</span>&#160;        <span class="comment">//</span></div>
<div class="line"><a name="l01693"></a><span class="lineno"> 1693</span>&#160;        <span class="comment">// Save clipping region so we can restore it later.</span></div>
<div class="line"><a name="l01694"></a><span class="lineno"> 1694</span>&#160;        <span class="comment">//</span></div>
<div class="line"><a name="l01695"></a><span class="lineno"> 1695</span>&#160;        <span class="comment">// hrgnSave = SaveClipRgn(hdc);</span></div>
<div class="line"><a name="l01696"></a><span class="lineno"> 1696</span>&#160;        <span class="comment">// IntersectClipRect(hdc, lprc-&gt;left, lprc-&gt;top, lprc-&gt;right, lprc-&gt;bottom);</span></div>
<div class="line"><a name="l01697"></a><span class="lineno"> 1697</span>&#160; </div>
<div class="line"><a name="l01698"></a><span class="lineno"> 1698</span>&#160;        hrgnClip = UserCreateRectRgn(0,0,0,0);</div>
<div class="line"><a name="l01699"></a><span class="lineno"> 1699</span>&#160;        <span class="keywordflow">if</span> (hrgnClip != NULL) {</div>
<div class="line"><a name="l01700"></a><span class="lineno"> 1700</span>&#160;            <span class="keywordflow">if</span> (UserGetClipRgn(hdc, hrgnClip) != 1) {</div>
<div class="line"><a name="l01701"></a><span class="lineno"> 1701</span>&#160;                UserDeleteObject(hrgnClip);</div>
<div class="line"><a name="l01702"></a><span class="lineno"> 1702</span>&#160;                hrgnClip = (HRGN)-1;</div>
<div class="line"><a name="l01703"></a><span class="lineno"> 1703</span>&#160;            }</div>
<div class="line"><a name="l01704"></a><span class="lineno"> 1704</span>&#160;            rc = *lprc;</div>
<div class="line"><a name="l01705"></a><span class="lineno"> 1705</span>&#160;            UserIntersectClipRect(hdc, rc.left, rc.top, rc.right, rc.bottom);</div>
<div class="line"><a name="l01706"></a><span class="lineno"> 1706</span>&#160;        }</div>
<div class="line"><a name="l01707"></a><span class="lineno"> 1707</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01708"></a><span class="lineno"> 1708</span>&#160;        hrgnClip = NULL;</div>
<div class="line"><a name="l01709"></a><span class="lineno"> 1709</span>&#160;    }</div>
<div class="line"><a name="l01710"></a><span class="lineno"> 1710</span>&#160; </div>
<div class="line"><a name="l01711"></a><span class="lineno"> 1711</span>&#160;    lpchTextBegin = lpchText;</div>
<div class="line"><a name="l01712"></a><span class="lineno"> 1712</span>&#160;    lpchEnd = lpchText + cchText;</div>
<div class="line"><a name="l01713"></a><span class="lineno"> 1713</span>&#160; </div>
<div class="line"><a name="l01714"></a><span class="lineno"> 1714</span>&#160;ProcessDrawText:</div>
<div class="line"><a name="l01715"></a><span class="lineno"> 1715</span>&#160; </div>
<div class="line"><a name="l01716"></a><span class="lineno"> 1716</span>&#160;    iLineCount = 0;  <span class="comment">// Reset number of lines to 1.</span></div>
<div class="line"><a name="l01717"></a><span class="lineno"> 1717</span>&#160;    yLine = lprc-&gt;top;</div>
<div class="line"><a name="l01718"></a><span class="lineno"> 1718</span>&#160; </div>
<div class="line"><a name="l01719"></a><span class="lineno"> 1719</span>&#160;    <span class="keywordflow">if</span> (wFormat &amp; DT_SINGLELINE) {</div>
<div class="line"><a name="l01720"></a><span class="lineno"> 1720</span>&#160;        iLineCount = 1;  <span class="comment">// It is a single line.</span></div>
<div class="line"><a name="l01721"></a><span class="lineno"> 1721</span>&#160; </div>
<div class="line"><a name="l01722"></a><span class="lineno"> 1722</span>&#160; </div>
<div class="line"><a name="l01723"></a><span class="lineno"> 1723</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l01724"></a><span class="lineno"> 1724</span>&#160;<span class="comment">         * Process single line DrawText.</span></div>
<div class="line"><a name="l01725"></a><span class="lineno"> 1725</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l01726"></a><span class="lineno"> 1726</span>&#160;        <span class="keywordflow">switch</span> (wFormat &amp; <a class="code" href="a03224.html#a51bb95844094a47a8b877c21c4201ca9">DT_VFMTMASK</a>) {</div>
<div class="line"><a name="l01727"></a><span class="lineno"> 1727</span>&#160;            <span class="keywordflow">case</span> DT_BOTTOM:</div>
<div class="line"><a name="l01728"></a><span class="lineno"> 1728</span>&#160;                yLine = lprc-&gt;bottom - DrawInfo.cyLineHeight;</div>
<div class="line"><a name="l01729"></a><span class="lineno"> 1729</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01730"></a><span class="lineno"> 1730</span>&#160; </div>
<div class="line"><a name="l01731"></a><span class="lineno"> 1731</span>&#160;            <span class="keywordflow">case</span> DT_VCENTER:</div>
<div class="line"><a name="l01732"></a><span class="lineno"> 1732</span>&#160;                yLine = lprc-&gt;top + ((lprc-&gt;bottom - lprc-&gt;top - DrawInfo.cyLineHeight) / 2);</div>
<div class="line"><a name="l01733"></a><span class="lineno"> 1733</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01734"></a><span class="lineno"> 1734</span>&#160;        }</div>
<div class="line"><a name="l01735"></a><span class="lineno"> 1735</span>&#160; </div>
<div class="line"><a name="l01736"></a><span class="lineno"> 1736</span>&#160;        cchText = <a class="code" href="a03224.html#ac4eec820aaba00887637766df1ebccbd">AddEllipsisAndDrawLine</a>(hdc, yLine, lpchText, cchText, dwDTformat, &amp;DrawInfo);</div>
<div class="line"><a name="l01737"></a><span class="lineno"> 1737</span>&#160;        yLine += DrawInfo.cyLineHeight;</div>
<div class="line"><a name="l01738"></a><span class="lineno"> 1738</span>&#160;        lpchText += cchText;</div>
<div class="line"><a name="l01739"></a><span class="lineno"> 1739</span>&#160;    } <span class="keywordflow">else</span>  {</div>
<div class="line"><a name="l01740"></a><span class="lineno"> 1740</span>&#160; </div>
<div class="line"><a name="l01741"></a><span class="lineno"> 1741</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l01742"></a><span class="lineno"> 1742</span>&#160;<span class="comment">         * Multiline</span></div>
<div class="line"><a name="l01743"></a><span class="lineno"> 1743</span>&#160;<span class="comment">         * If the height of the rectangle is not an integral multiple of the</span></div>
<div class="line"><a name="l01744"></a><span class="lineno"> 1744</span>&#160;<span class="comment">         * average char height, then it is possible that the last line drawn</span></div>
<div class="line"><a name="l01745"></a><span class="lineno"> 1745</span>&#160;<span class="comment">         * is only partially visible. However, if DT_EDITCONTROL style is</span></div>
<div class="line"><a name="l01746"></a><span class="lineno"> 1746</span>&#160;<span class="comment">         * specified, then we must make sure that the last line is not drawn if</span></div>
<div class="line"><a name="l01747"></a><span class="lineno"> 1747</span>&#160;<span class="comment">         * it is going to be partially visible. This will help imitate the</span></div>
<div class="line"><a name="l01748"></a><span class="lineno"> 1748</span>&#160;<span class="comment">         * appearance of an edit control.</span></div>
<div class="line"><a name="l01749"></a><span class="lineno"> 1749</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l01750"></a><span class="lineno"> 1750</span>&#160;        <span class="keywordflow">if</span> (wFormat &amp; DT_EDITCONTROL)</div>
<div class="line"><a name="l01751"></a><span class="lineno"> 1751</span>&#160;            yLastLineHeight = DrawInfo.cyLineHeight;</div>
<div class="line"><a name="l01752"></a><span class="lineno"> 1752</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l01753"></a><span class="lineno"> 1753</span>&#160;            yLastLineHeight = 0;</div>
<div class="line"><a name="l01754"></a><span class="lineno"> 1754</span>&#160; </div>
<div class="line"><a name="l01755"></a><span class="lineno"> 1755</span>&#160;        iySign = DrawInfo.iYSign;</div>
<div class="line"><a name="l01756"></a><span class="lineno"> 1756</span>&#160;        fLastLine = FALSE;</div>
<div class="line"><a name="l01757"></a><span class="lineno"> 1757</span>&#160;        <span class="comment">// Process multiline DrawText.</span></div>
<div class="line"><a name="l01758"></a><span class="lineno"> 1758</span>&#160;        <span class="keywordflow">while</span> ((lpchText &lt; lpchEnd) &amp;&amp; (!fLastLine)) {</div>
<div class="line"><a name="l01759"></a><span class="lineno"> 1759</span>&#160;          <span class="comment">// Check if the line we are about to draw is the last line that needs</span></div>
<div class="line"><a name="l01760"></a><span class="lineno"> 1760</span>&#160;          <span class="comment">// to be drawn.</span></div>
<div class="line"><a name="l01761"></a><span class="lineno"> 1761</span>&#160;          <span class="comment">// Let us check if the display goes out of the clip rect and if so</span></div>
<div class="line"><a name="l01762"></a><span class="lineno"> 1762</span>&#160;          <span class="comment">// let us stop here, as an optimisation;</span></div>
<div class="line"><a name="l01763"></a><span class="lineno"> 1763</span>&#160;          <span class="keywordflow">if</span> ((!(wFormat &amp; DT_CALCRECT)) &amp;&amp;    <span class="comment">// We don&#39;t need to calc rect?</span></div>
<div class="line"><a name="l01764"></a><span class="lineno"> 1764</span>&#160;                  (!(wFormat &amp; DT_NOCLIP)) &amp;&amp;  <span class="comment">// Must we clip the display ?</span></div>
<div class="line"><a name="l01765"></a><span class="lineno"> 1765</span>&#160;                                               <span class="comment">// Are we outside the rect?</span></div>
<div class="line"><a name="l01766"></a><span class="lineno"> 1766</span>&#160;                  ((yLine + DrawInfo.cyLineHeight + yLastLineHeight)*iySign &gt; (lprc-&gt;bottom*iySign))) {</div>
<div class="line"><a name="l01767"></a><span class="lineno"> 1767</span>&#160;              fLastLine = TRUE;    <span class="comment">// Let us quit this loop</span></div>
<div class="line"><a name="l01768"></a><span class="lineno"> 1768</span>&#160;          }</div>
<div class="line"><a name="l01769"></a><span class="lineno"> 1769</span>&#160; </div>
<div class="line"><a name="l01770"></a><span class="lineno"> 1770</span>&#160; </div>
<div class="line"><a name="l01771"></a><span class="lineno"> 1771</span>&#160;          <span class="comment">/*</span></div>
<div class="line"><a name="l01772"></a><span class="lineno"> 1772</span>&#160;<span class="comment">           * We do the Ellipsis processing only for the last line.</span></div>
<div class="line"><a name="l01773"></a><span class="lineno"> 1773</span>&#160;<span class="comment">           */</span></div>
<div class="line"><a name="l01774"></a><span class="lineno"> 1774</span>&#160;          <span class="keywordflow">if</span> (fLastLine &amp;&amp; (dwDTformat &amp; (DT_END_ELLIPSIS | DT_PATH_ELLIPSIS))) {</div>
<div class="line"><a name="l01775"></a><span class="lineno"> 1775</span>&#160;              lpchText += <a class="code" href="a03224.html#ac4eec820aaba00887637766df1ebccbd">AddEllipsisAndDrawLine</a>(hdc, yLine, lpchText, cchText, dwDTformat, &amp;DrawInfo);</div>
<div class="line"><a name="l01776"></a><span class="lineno"> 1776</span>&#160;          } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01777"></a><span class="lineno"> 1777</span>&#160;              lpchNextLineSt = (LPWSTR)<a class="code" href="a03224.html#a44d8495062e6993b1d8061e8cfa5488d">DT_GetLineBreak</a>(hdc, lpchText, cchText, dwDTformat, &amp;iLineLength, &amp;DrawInfo);</div>
<div class="line"><a name="l01778"></a><span class="lineno"> 1778</span>&#160; </div>
<div class="line"><a name="l01779"></a><span class="lineno"> 1779</span>&#160;              <span class="comment">/*</span></div>
<div class="line"><a name="l01780"></a><span class="lineno"> 1780</span>&#160;<span class="comment">               * Check if we need to put ellipsis at the end of this line.</span></div>
<div class="line"><a name="l01781"></a><span class="lineno"> 1781</span>&#160;<span class="comment">               * Also check if this is the last line.</span></div>
<div class="line"><a name="l01782"></a><span class="lineno"> 1782</span>&#160;<span class="comment">               */</span></div>
<div class="line"><a name="l01783"></a><span class="lineno"> 1783</span>&#160;              <span class="keywordflow">if</span> ((dwDTformat &amp; DT_WORD_ELLIPSIS) ||</div>
<div class="line"><a name="l01784"></a><span class="lineno"> 1784</span>&#160;                       ((lpchNextLineSt &gt;= lpchEnd) &amp;&amp; (dwDTformat &amp; (DT_END_ELLIPSIS | DT_PATH_ELLIPSIS))))</div>
<div class="line"><a name="l01785"></a><span class="lineno"> 1785</span>&#160;                  <a class="code" href="a03224.html#ac4eec820aaba00887637766df1ebccbd">AddEllipsisAndDrawLine</a>(hdc, yLine, lpchText, iLineLength, dwDTformat, &amp;DrawInfo);</div>
<div class="line"><a name="l01786"></a><span class="lineno"> 1786</span>&#160;              <span class="keywordflow">else</span></div>
<div class="line"><a name="l01787"></a><span class="lineno"> 1787</span>&#160;                  <a class="code" href="a03224.html#a7072070208c274ab4d8612e98cdb297d">DT_DrawJustifiedLine</a>(hdc, yLine, lpchText, iLineLength, dwDTformat, &amp;DrawInfo);</div>
<div class="line"><a name="l01788"></a><span class="lineno"> 1788</span>&#160;              cchText -= ((PBYTE)lpchNextLineSt - (PBYTE)lpchText) / <span class="keyword">sizeof</span>(WCHAR);</div>
<div class="line"><a name="l01789"></a><span class="lineno"> 1789</span>&#160;              lpchText = lpchNextLineSt;</div>
<div class="line"><a name="l01790"></a><span class="lineno"> 1790</span>&#160;          }</div>
<div class="line"><a name="l01791"></a><span class="lineno"> 1791</span>&#160;            iLineCount++; <span class="comment">// We draw one more line.</span></div>
<div class="line"><a name="l01792"></a><span class="lineno"> 1792</span>&#160;            yLine += DrawInfo.cyLineHeight;</div>
<div class="line"><a name="l01793"></a><span class="lineno"> 1793</span>&#160;        }</div>
<div class="line"><a name="l01794"></a><span class="lineno"> 1794</span>&#160; </div>
<div class="line"><a name="l01795"></a><span class="lineno"> 1795</span>&#160; </div>
<div class="line"><a name="l01796"></a><span class="lineno"> 1796</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l01797"></a><span class="lineno"> 1797</span>&#160;<span class="comment">         * For Win3.1 and NT compatibility, if the last char is a CR or a LF</span></div>
<div class="line"><a name="l01798"></a><span class="lineno"> 1798</span>&#160;<span class="comment">         * then the height returned includes one more line.</span></div>
<div class="line"><a name="l01799"></a><span class="lineno"> 1799</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l01800"></a><span class="lineno"> 1800</span>&#160;        <span class="keywordflow">if</span> ((!(dwDTformat &amp; DT_EDITCONTROL)) &amp;&amp;</div>
<div class="line"><a name="l01801"></a><span class="lineno"> 1801</span>&#160;                (lpchEnd &gt; lpchTextBegin)    &amp;&amp;   <span class="comment">// If zero length it will fault.</span></div>
<div class="line"><a name="l01802"></a><span class="lineno"> 1802</span>&#160;                (((ch = (*(lpchEnd-1))) == <a class="code" href="a03224.html#a876ce77f3c672c7162658151e648389e">CR</a>) || (ch == <a class="code" href="a03224.html#a350c9d6cb81908d59427ee96844d1a9c">LF</a>)))</div>
<div class="line"><a name="l01803"></a><span class="lineno"> 1803</span>&#160;            yLine += DrawInfo.cyLineHeight;</div>
<div class="line"><a name="l01804"></a><span class="lineno"> 1804</span>&#160;    }</div>
<div class="line"><a name="l01805"></a><span class="lineno"> 1805</span>&#160; </div>
<div class="line"><a name="l01806"></a><span class="lineno"> 1806</span>&#160; </div>
<div class="line"><a name="l01807"></a><span class="lineno"> 1807</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01808"></a><span class="lineno"> 1808</span>&#160;<span class="comment">     * If DT_CALCRECT, modify width and height of rectangle to include</span></div>
<div class="line"><a name="l01809"></a><span class="lineno"> 1809</span>&#160;<span class="comment">     * all of the text drawn.</span></div>
<div class="line"><a name="l01810"></a><span class="lineno"> 1810</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01811"></a><span class="lineno"> 1811</span>&#160;    <span class="keywordflow">if</span> (wFormat &amp; DT_CALCRECT) {</div>
<div class="line"><a name="l01812"></a><span class="lineno"> 1812</span>&#160;        DrawInfo.rcFormat.right = DrawInfo.rcFormat.left + DrawInfo.cxMaxExtent * DrawInfo.iXSign;</div>
<div class="line"><a name="l01813"></a><span class="lineno"> 1813</span>&#160;        lprc-&gt;right = DrawInfo.rcFormat.right + DrawInfo.cxRightMargin;</div>
<div class="line"><a name="l01814"></a><span class="lineno"> 1814</span>&#160; </div>
<div class="line"><a name="l01815"></a><span class="lineno"> 1815</span>&#160;        <span class="comment">// If the Width is more than what was provided, we have to redo all</span></div>
<div class="line"><a name="l01816"></a><span class="lineno"> 1816</span>&#160;        <span class="comment">// the calculations, because, the number of lines can be less now.</span></div>
<div class="line"><a name="l01817"></a><span class="lineno"> 1817</span>&#160;        <span class="comment">// (We need to do this only if we have more than one line).</span></div>
<div class="line"><a name="l01818"></a><span class="lineno"> 1818</span>&#160;        <span class="keywordflow">if</span>((iLineCount &gt; 1) &amp;&amp; (DrawInfo.cxMaxExtent &gt; DrawInfo.cxMaxWidth)) {</div>
<div class="line"><a name="l01819"></a><span class="lineno"> 1819</span>&#160;            DrawInfo.cxMaxWidth = DrawInfo.cxMaxExtent;</div>
<div class="line"><a name="l01820"></a><span class="lineno"> 1820</span>&#160;            lpchText = lpchTextBegin;</div>
<div class="line"><a name="l01821"></a><span class="lineno"> 1821</span>&#160;            cchText = ((PBYTE)lpchEnd - (PBYTE)lpchTextBegin)/<span class="keyword">sizeof</span>(WCHAR);</div>
<div class="line"><a name="l01822"></a><span class="lineno"> 1822</span>&#160;            <span class="keywordflow">goto</span>  ProcessDrawText;  <span class="comment">// Start all over again!</span></div>
<div class="line"><a name="l01823"></a><span class="lineno"> 1823</span>&#160;        }</div>
<div class="line"><a name="l01824"></a><span class="lineno"> 1824</span>&#160;        lprc-&gt;bottom = yLine;</div>
<div class="line"><a name="l01825"></a><span class="lineno"> 1825</span>&#160;    }</div>
<div class="line"><a name="l01826"></a><span class="lineno"> 1826</span>&#160; </div>
<div class="line"><a name="l01827"></a><span class="lineno"> 1827</span>&#160;<span class="comment">// if (!(wFormat &amp; DT_NOCLIP))</span></div>
<div class="line"><a name="l01828"></a><span class="lineno"> 1828</span>&#160;<span class="comment">// {</span></div>
<div class="line"><a name="l01829"></a><span class="lineno"> 1829</span>&#160;<span class="comment">//     RestoreClipRgn(hdc, hrgnClip);</span></div>
<div class="line"><a name="l01830"></a><span class="lineno"> 1830</span>&#160;<span class="comment">// }</span></div>
<div class="line"><a name="l01831"></a><span class="lineno"> 1831</span>&#160; </div>
<div class="line"><a name="l01832"></a><span class="lineno"> 1832</span>&#160;    <span class="keywordflow">if</span> (hrgnClip != NULL) {</div>
<div class="line"><a name="l01833"></a><span class="lineno"> 1833</span>&#160;        <span class="keywordflow">if</span> (hrgnClip == (HRGN)-1) {</div>
<div class="line"><a name="l01834"></a><span class="lineno"> 1834</span>&#160;            UserExtSelectClipRgn(hdc, NULL, RGN_COPY);</div>
<div class="line"><a name="l01835"></a><span class="lineno"> 1835</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01836"></a><span class="lineno"> 1836</span>&#160;            UserExtSelectClipRgn(hdc, hrgnClip, RGN_COPY);</div>
<div class="line"><a name="l01837"></a><span class="lineno"> 1837</span>&#160;            UserDeleteObject(hrgnClip);</div>
<div class="line"><a name="l01838"></a><span class="lineno"> 1838</span>&#160;        }</div>
<div class="line"><a name="l01839"></a><span class="lineno"> 1839</span>&#160;    }</div>
<div class="line"><a name="l01840"></a><span class="lineno"> 1840</span>&#160; </div>
<div class="line"><a name="l01841"></a><span class="lineno"> 1841</span>&#160; </div>
<div class="line"><a name="l01842"></a><span class="lineno"> 1842</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01843"></a><span class="lineno"> 1843</span>&#160;<span class="comment">     * Copy the number of characters actually drawn</span></div>
<div class="line"><a name="l01844"></a><span class="lineno"> 1844</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01845"></a><span class="lineno"> 1845</span>&#160;    <span class="keywordflow">if</span>(lpDTparams != NULL)</div>
<div class="line"><a name="l01846"></a><span class="lineno"> 1846</span>&#160;        lpDTparams-&gt;uiLengthDrawn = (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)((PBYTE)lpchText - (PBYTE)lpchTextBegin)/<span class="keyword">sizeof</span>(WCHAR);</div>
<div class="line"><a name="l01847"></a><span class="lineno"> 1847</span>&#160; </div>
<div class="line"><a name="l01848"></a><span class="lineno"> 1848</span>&#160;    <span class="keywordflow">if</span> (yLine == lprc-&gt;top)</div>
<div class="line"><a name="l01849"></a><span class="lineno"> 1849</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l01850"></a><span class="lineno"> 1850</span>&#160; </div>
<div class="line"><a name="l01851"></a><span class="lineno"> 1851</span>&#160;    <span class="keywordflow">return</span> (yLine - lprc-&gt;top);</div>
<div class="line"><a name="l01852"></a><span class="lineno"> 1852</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l01492">AddEllipsisAndDrawLine()</a>, <a class="el" href="a03224_source.html#l00016">CR</a>, <a class="el" href="a03224_source.html#l00960">DT_DrawJustifiedLine()</a>, <a class="el" href="a03224_source.html#l01201">DT_GetLineBreak()</a>, <a class="el" href="a03224_source.html#l00997">DT_InitDrawTextInfo()</a>, <a class="el" href="a03224_source.html#l00019">DT_VFMTMASK</a>, <a class="el" href="a03224_source.html#l00017">LF</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a>, <a class="el" href="a00371_source.html#l00119">RIPERR0</a>, <a class="el" href="a00371_source.html#l00120">RIPERR1</a>, <a class="el" href="a00371_source.html#l00131">RIPMSG0</a> , 以及 <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00005_source.html#l00526">BNMultiDraw()</a>, <a class="el" href="a00005_source.html#l00483">BNMultiExtent()</a>, <a class="el" href="a03218_source.html#l00112">DrawTextA()</a>, <a class="el" href="a03218_source.html#l00044">DrawTextExA()</a>, <a class="el" href="a03218_source.html#l00077">DrawTextW()</a>, <a class="el" href="a00212_source.html#l00458">SoftModalMessageBox()</a> , 以及 <a class="el" href="a00248_source.html#l00334">StaticCallback()</a>.</p>

</div>
</div>
<a id="afaad18d6511aeb4e5f0f2e6b9db4bdea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afaad18d6511aeb4e5f0f2e6b9db4bdea">&#9670;&nbsp;</a></span>DT_AdjustWhiteSpaces()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LPCWSTR DT_AdjustWhiteSpaces </td>
          <td>(</td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpStNext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPINT&#160;</td>
          <td class="paramname"><em>lpiCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wFormat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l01131">1131</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>&#160;{</div>
<div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160;  <span class="keywordflow">switch</span>(wFormat &amp; <a class="code" href="a03224.html#ab132e22217cfdd047e85f4650e851147">DT_HFMTMASK</a>) {</div>
<div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>&#160;      <span class="keywordflow">case</span> DT_LEFT:</div>
<div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160;        <span class="comment">// Prevent a white space at the begining of a left justfied text.</span></div>
<div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>&#160;        <span class="comment">// Is there a white space at the begining of next line......</span></div>
<div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>&#160;        <span class="keywordflow">if</span>((*lpStNext == TEXT(<span class="charliteral">&#39; &#39;</span>)) || (*lpStNext == TEXT(<span class="charliteral">&#39;\t&#39;</span>))) {</div>
<div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>&#160;            <span class="comment">// ...then, exclude it from next line.</span></div>
<div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160;            lpStNext++;</div>
<div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160;          }</div>
<div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>&#160; </div>
<div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>&#160;      <span class="keywordflow">case</span> DT_RIGHT:</div>
<div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>&#160;        <span class="comment">// Prevent a white space at the end of a RIGHT justified text.</span></div>
<div class="line"><a name="l01145"></a><span class="lineno"> 1145</span>&#160;        <span class="comment">// Is there a white space at the end of current line,.......</span></div>
<div class="line"><a name="l01146"></a><span class="lineno"> 1146</span>&#160;        <span class="keywordflow">if</span>((*(lpStNext-1) == TEXT(<span class="charliteral">&#39; &#39;</span>)) || (*(lpStNext - 1) == TEXT(<span class="charliteral">&#39;\t&#39;</span>))) {</div>
<div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>&#160;            <span class="comment">// .....then, Skip the white space from the current line.</span></div>
<div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>&#160;            (*lpiCount)--;</div>
<div class="line"><a name="l01149"></a><span class="lineno"> 1149</span>&#160;          }</div>
<div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>&#160; </div>
<div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>&#160;      <span class="keywordflow">case</span> DT_CENTER:</div>
<div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160;        <span class="comment">// Exclude white spaces from the begining and end of CENTERed lines.</span></div>
<div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>&#160;        <span class="comment">// If there is a white space at the end of current line.......</span></div>
<div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160;        <span class="keywordflow">if</span>((*(lpStNext-1) == TEXT(<span class="charliteral">&#39; &#39;</span>)) || (*(lpStNext - 1) == TEXT(<span class="charliteral">&#39;\t&#39;</span>)))</div>
<div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160;            (*lpiCount)--;    <span class="comment">//...., don&#39;t count it for justification.</span></div>
<div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>&#160;        <span class="comment">// If there is a white space at the begining of next line.......</span></div>
<div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>&#160;        <span class="keywordflow">if</span>((*lpStNext == TEXT(<span class="charliteral">&#39; &#39;</span>)) || (*lpStNext == TEXT(<span class="charliteral">&#39;\t&#39;</span>)))</div>
<div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>&#160;            lpStNext++;       <span class="comment">//...., exclude it from next line.</span></div>
<div class="line"><a name="l01160"></a><span class="lineno"> 1160</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>&#160;    }</div>
<div class="line"><a name="l01162"></a><span class="lineno"> 1162</span>&#160;  <span class="keywordflow">return</span> lpStNext;</div>
<div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l00018">DT_HFMTMASK</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01201">DT_GetLineBreak()</a>.</p>

</div>
</div>
<a id="a372cd9491d5e2afd7f98e57f68dfd905"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a372cd9491d5e2afd7f98e57f68dfd905">&#9670;&nbsp;</a></span>DT_BreakAWord()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LPCWSTR DT_BreakAWord </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hdc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpchText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>iLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>iWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wFormat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>iOverhang</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l01170">1170</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l01172"></a><span class="lineno"> 1172</span>&#160;{</div>
<div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>&#160;  <span class="keywordtype">int</span>  iLow = 0, iHigh = iLength;</div>
<div class="line"><a name="l01174"></a><span class="lineno"> 1174</span>&#160;  <span class="keywordtype">int</span>  iNew;</div>
<div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>&#160; </div>
<div class="line"><a name="l01176"></a><span class="lineno"> 1176</span>&#160; </div>
<div class="line"><a name="l01177"></a><span class="lineno"> 1177</span>&#160;  <span class="keywordflow">while</span>((iHigh - iLow) &gt; 1) {</div>
<div class="line"><a name="l01178"></a><span class="lineno"> 1178</span>&#160;      iNew = iLow + (iHigh - iLow)/2;</div>
<div class="line"><a name="l01179"></a><span class="lineno"> 1179</span>&#160;      <span class="keywordflow">if</span>(<a class="code" href="a03224.html#a4e04593ff1f3b6675984ed4fa4b27f43">DT_GetExtentMinusPrefixes</a>(hdc, lpchText, iNew, wFormat, iOverhang) &gt; iWidth)</div>
<div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>&#160;          iHigh = iNew;</div>
<div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>&#160;      <span class="keywordflow">else</span></div>
<div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>&#160;          iLow = iNew;</div>
<div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>&#160;    }</div>
<div class="line"><a name="l01184"></a><span class="lineno"> 1184</span>&#160;  <span class="comment">// If the width is too low, we must print atleast one char per line.</span></div>
<div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>&#160;  <span class="comment">// Else, we will be in an infinite loop.</span></div>
<div class="line"><a name="l01186"></a><span class="lineno"> 1186</span>&#160;  <span class="keywordflow">if</span>(!iLow &amp;&amp; iLength)</div>
<div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>&#160;      iLow = 1;</div>
<div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160;  <span class="keywordflow">return</span> (lpchText+iLow);</div>
<div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l00866">DT_GetExtentMinusPrefixes()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01201">DT_GetLineBreak()</a>.</p>

</div>
</div>
<a id="a7072070208c274ab4d8612e98cdb297d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7072070208c274ab4d8612e98cdb297d">&#9670;&nbsp;</a></span>DT_DrawJustifiedLine()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DT_DrawJustifiedLine </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hdc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>yTop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpchLineSt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cchCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wFormat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a>&#160;</td>
          <td class="paramname"><em>lpDrawInfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00960">960</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00963"></a><span class="lineno">  963</span>&#160;{</div>
<div class="line"><a name="l00964"></a><span class="lineno">  964</span>&#160;  LPRECT lprc;</div>
<div class="line"><a name="l00965"></a><span class="lineno">  965</span>&#160;  <span class="keywordtype">int</span>   cxExtent;</div>
<div class="line"><a name="l00966"></a><span class="lineno">  966</span>&#160;  <span class="keywordtype">int</span>   xLeft;</div>
<div class="line"><a name="l00967"></a><span class="lineno">  967</span>&#160; </div>
<div class="line"><a name="l00968"></a><span class="lineno">  968</span>&#160;  lprc = &amp;(lpDrawInfo-&gt;rcFormat);</div>
<div class="line"><a name="l00969"></a><span class="lineno">  969</span>&#160;  xLeft = lprc-&gt;left;</div>
<div class="line"><a name="l00970"></a><span class="lineno">  970</span>&#160; </div>
<div class="line"><a name="l00971"></a><span class="lineno">  971</span>&#160;  <span class="comment">// Handle the special justifications (right or centered) properly.</span></div>
<div class="line"><a name="l00972"></a><span class="lineno">  972</span>&#160;  <span class="keywordflow">if</span>(wFormat &amp; (DT_CENTER | DT_RIGHT)) {</div>
<div class="line"><a name="l00973"></a><span class="lineno">  973</span>&#160;      cxExtent = <a class="code" href="a03224.html#a05adba5e1573b32335f8496037f88441">DT_DrawStr</a>(hdc, xLeft, yTop, lpchLineSt, cchCount, FALSE,</div>
<div class="line"><a name="l00974"></a><span class="lineno">  974</span>&#160;                     wFormat, lpDrawInfo) + lpDrawInfo-&gt;cxOverhang;</div>
<div class="line"><a name="l00975"></a><span class="lineno">  975</span>&#160;      <span class="keywordflow">if</span>(wFormat &amp; DT_CENTER)</div>
<div class="line"><a name="l00976"></a><span class="lineno">  976</span>&#160;          xLeft = lprc-&gt;left + (((lprc-&gt;right - lprc-&gt;left) - cxExtent) &gt;&gt; 1);</div>
<div class="line"><a name="l00977"></a><span class="lineno">  977</span>&#160;      <span class="keywordflow">else</span></div>
<div class="line"><a name="l00978"></a><span class="lineno">  978</span>&#160;          xLeft = lprc-&gt;right - cxExtent;</div>
<div class="line"><a name="l00979"></a><span class="lineno">  979</span>&#160;    } <span class="keywordflow">else</span></div>
<div class="line"><a name="l00980"></a><span class="lineno">  980</span>&#160;      xLeft = lprc-&gt;left;</div>
<div class="line"><a name="l00981"></a><span class="lineno">  981</span>&#160; </div>
<div class="line"><a name="l00982"></a><span class="lineno">  982</span>&#160;  <span class="comment">// Draw the whole line.</span></div>
<div class="line"><a name="l00983"></a><span class="lineno">  983</span>&#160;  cxExtent = <a class="code" href="a03224.html#a05adba5e1573b32335f8496037f88441">DT_DrawStr</a>(hdc, xLeft, yTop, lpchLineSt, cchCount, TRUE, wFormat,</div>
<div class="line"><a name="l00984"></a><span class="lineno">  984</span>&#160;                        lpDrawInfo) +lpDrawInfo-&gt;cxOverhang;</div>
<div class="line"><a name="l00985"></a><span class="lineno">  985</span>&#160;  <span class="keywordflow">if</span>(cxExtent &gt; lpDrawInfo-&gt;cxMaxExtent)</div>
<div class="line"><a name="l00986"></a><span class="lineno">  986</span>&#160;      lpDrawInfo-&gt;cxMaxExtent = cxExtent;</div>
<div class="line"><a name="l00987"></a><span class="lineno">  987</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l00900">DT_DrawStr()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01492">AddEllipsisAndDrawLine()</a> , 以及 <a class="el" href="a03224_source.html#l01575">DrawTextExW()</a>.</p>

</div>
</div>
<a id="a05adba5e1573b32335f8496037f88441"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05adba5e1573b32335f8496037f88441">&#9670;&nbsp;</a></span>DT_DrawStr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int DT_DrawStr </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hdc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>xLeft</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>yTop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpchStr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cchCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fDraw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wFormat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a>&#160;</td>
          <td class="paramname"><em>lpDrawInfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00900">900</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00903"></a><span class="lineno">  903</span>&#160;{</div>
<div class="line"><a name="l00904"></a><span class="lineno">  904</span>&#160;  LPCWSTR        lpch;</div>
<div class="line"><a name="l00905"></a><span class="lineno">  905</span>&#160;  <span class="keywordtype">int</span>   iLen;</div>
<div class="line"><a name="l00906"></a><span class="lineno">  906</span>&#160;  <span class="keywordtype">int</span>   cxExtent;</div>
<div class="line"><a name="l00907"></a><span class="lineno">  907</span>&#160;  <span class="keywordtype">int</span>   xOldLeft = xLeft;  <span class="comment">// Save the xLeft given to compute the extent later</span></div>
<div class="line"><a name="l00908"></a><span class="lineno">  908</span>&#160;  <span class="keywordtype">int</span>   xTabLength = lpDrawInfo-&gt;cxTabLength;</div>
<div class="line"><a name="l00909"></a><span class="lineno">  909</span>&#160;  <span class="keywordtype">int</span>   iTabOrigin = lpDrawInfo-&gt;rcFormat.left;</div>
<div class="line"><a name="l00910"></a><span class="lineno">  910</span>&#160; </div>
<div class="line"><a name="l00911"></a><span class="lineno">  911</span>&#160;  <span class="comment">// Check if the tabs need to be expanded</span></div>
<div class="line"><a name="l00912"></a><span class="lineno">  912</span>&#160;  <span class="keywordflow">if</span>(wFormat &amp; DT_EXPANDTABS) {</div>
<div class="line"><a name="l00913"></a><span class="lineno">  913</span>&#160;      <span class="keywordflow">while</span>(cchCount) {</div>
<div class="line"><a name="l00914"></a><span class="lineno">  914</span>&#160;          <span class="comment">// Look for a tab</span></div>
<div class="line"><a name="l00915"></a><span class="lineno">  915</span>&#160;          <span class="keywordflow">for</span>(iLen = 0, lpch = lpchStr; iLen &lt; cchCount; iLen++)</div>
<div class="line"><a name="l00916"></a><span class="lineno">  916</span>&#160;                <span class="keywordflow">if</span>(*lpch++ == TEXT(<span class="charliteral">&#39;\t&#39;</span>))</div>
<div class="line"><a name="l00917"></a><span class="lineno">  917</span>&#160;                  <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00918"></a><span class="lineno">  918</span>&#160; </div>
<div class="line"><a name="l00919"></a><span class="lineno">  919</span>&#160;          <span class="comment">// Draw text, if any, upto the tab</span></div>
<div class="line"><a name="l00920"></a><span class="lineno">  920</span>&#160;          <span class="keywordflow">if</span>(iLen) {</div>
<div class="line"><a name="l00921"></a><span class="lineno">  921</span>&#160;              <span class="comment">// Draw the substring taking care of the prefixes.</span></div>
<div class="line"><a name="l00922"></a><span class="lineno">  922</span>&#160;              <span class="keywordflow">if</span>(fDraw &amp;&amp; (!(wFormat &amp; DT_CALCRECT))) { <span class="comment">// Only if we need to draw text</span></div>
<div class="line"><a name="l00923"></a><span class="lineno">  923</span>&#160;                  (*(lpDrawInfo-&gt;lpfnTextDraw))(hdc, xLeft, yTop, (LPWSTR)lpchStr, iLen);</div>
<div class="line"><a name="l00924"></a><span class="lineno">  924</span>&#160;              }</div>
<div class="line"><a name="l00925"></a><span class="lineno">  925</span>&#160;              <span class="comment">// Get the extent of this sub string and add it to xLeft.</span></div>
<div class="line"><a name="l00926"></a><span class="lineno">  926</span>&#160;              xLeft += <a class="code" href="a03224.html#a4e04593ff1f3b6675984ed4fa4b27f43">DT_GetExtentMinusPrefixes</a>(hdc, lpchStr, iLen, wFormat, lpDrawInfo-&gt;cxOverhang) - lpDrawInfo-&gt;cxOverhang;</div>
<div class="line"><a name="l00927"></a><span class="lineno">  927</span>&#160;            }</div>
<div class="line"><a name="l00928"></a><span class="lineno">  928</span>&#160; </div>
<div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160;          <span class="comment">//if a TAB was found earlier, calculate the start of next sub-string.</span></div>
<div class="line"><a name="l00930"></a><span class="lineno">  930</span>&#160;          <span class="keywordflow">if</span>(iLen &lt; cchCount) {</div>
<div class="line"><a name="l00931"></a><span class="lineno">  931</span>&#160;              iLen++;  <span class="comment">// Skip the tab</span></div>
<div class="line"><a name="l00932"></a><span class="lineno">  932</span>&#160;              <span class="keywordflow">if</span>(xTabLength) <span class="comment">// Tab length could be zero</span></div>
<div class="line"><a name="l00933"></a><span class="lineno">  933</span>&#160;                  xLeft = (((xLeft - iTabOrigin)/xTabLength) + 1)*xTabLength + iTabOrigin;</div>
<div class="line"><a name="l00934"></a><span class="lineno">  934</span>&#160;            }</div>
<div class="line"><a name="l00935"></a><span class="lineno">  935</span>&#160; </div>
<div class="line"><a name="l00936"></a><span class="lineno">  936</span>&#160;          <span class="comment">// Calculate the details of the string that remains to be drawn.</span></div>
<div class="line"><a name="l00937"></a><span class="lineno">  937</span>&#160;          cchCount -= iLen;</div>
<div class="line"><a name="l00938"></a><span class="lineno">  938</span>&#160;          lpchStr = lpch;</div>
<div class="line"><a name="l00939"></a><span class="lineno">  939</span>&#160;        }</div>
<div class="line"><a name="l00940"></a><span class="lineno">  940</span>&#160;      cxExtent = xLeft - xOldLeft;</div>
<div class="line"><a name="l00941"></a><span class="lineno">  941</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00942"></a><span class="lineno">  942</span>&#160;      <span class="comment">// If required, draw the text (with either PSMTextOut or PSTextOut)</span></div>
<div class="line"><a name="l00943"></a><span class="lineno">  943</span>&#160;      <span class="keywordflow">if</span>(fDraw &amp;&amp; (!(wFormat &amp; DT_CALCRECT)))   {</div>
<div class="line"><a name="l00944"></a><span class="lineno">  944</span>&#160;          (*(lpDrawInfo-&gt;lpfnTextDraw))(hdc, xLeft, yTop, (LPWSTR)lpchStr, cchCount);</div>
<div class="line"><a name="l00945"></a><span class="lineno">  945</span>&#160;      }</div>
<div class="line"><a name="l00946"></a><span class="lineno">  946</span>&#160;      <span class="comment">// Compute the extent of the text.</span></div>
<div class="line"><a name="l00947"></a><span class="lineno">  947</span>&#160;      cxExtent = <a class="code" href="a03224.html#a4e04593ff1f3b6675984ed4fa4b27f43">DT_GetExtentMinusPrefixes</a>(hdc, lpchStr, cchCount, wFormat,</div>
<div class="line"><a name="l00948"></a><span class="lineno">  948</span>&#160;                        lpDrawInfo-&gt;cxOverhang) - lpDrawInfo-&gt;cxOverhang;</div>
<div class="line"><a name="l00949"></a><span class="lineno">  949</span>&#160;    }</div>
<div class="line"><a name="l00950"></a><span class="lineno">  950</span>&#160;  <span class="keywordflow">return</span> cxExtent;</div>
<div class="line"><a name="l00951"></a><span class="lineno">  951</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l00866">DT_GetExtentMinusPrefixes()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l00960">DT_DrawJustifiedLine()</a> , 以及 <a class="el" href="a03224_source.html#l01201">DT_GetLineBreak()</a>.</p>

</div>
</div>
<a id="a4e04593ff1f3b6675984ed4fa4b27f43"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e04593ff1f3b6675984ed4fa4b27f43">&#9670;&nbsp;</a></span>DT_GetExtentMinusPrefixes()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int DT_GetExtentMinusPrefixes </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hdc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpchStr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cchCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wFormat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>iOverhang</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00866">866</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00867"></a><span class="lineno">  867</span>&#160;{</div>
<div class="line"><a name="l00868"></a><span class="lineno">  868</span>&#160;  <span class="keywordtype">int</span>  iPrefixCount;</div>
<div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;  <span class="keywordtype">int</span>  cxPrefixes = 0;</div>
<div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160;  WCHAR PrefixChar = CH_PREFIX;</div>
<div class="line"><a name="l00871"></a><span class="lineno">  871</span>&#160;  SIZE size;</div>
<div class="line"><a name="l00872"></a><span class="lineno">  872</span>&#160; </div>
<div class="line"><a name="l00873"></a><span class="lineno">  873</span>&#160;  <span class="keywordflow">if</span>((!(wFormat &amp; DT_NOPREFIX)) &amp;&amp;</div>
<div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;      (iPrefixCount = HIWORD(<a class="code" href="a03224.html#af7eb24aded300703b63d9542295f214f">GetPrefixCount</a>(lpchStr, cchCount, NULL, 0)))) {</div>
<div class="line"><a name="l00875"></a><span class="lineno">  875</span>&#160;<span class="preprocessor">#ifdef FE_SB // DT_GetExtentMinusPrefixes()</span></div>
<div class="line"><a name="l00876"></a><span class="lineno">  876</span>&#160;      <span class="comment">//</span></div>
<div class="line"><a name="l00877"></a><span class="lineno">  877</span>&#160;      <span class="comment">// Kanji Windows has three shortcut prefixes...</span></div>
<div class="line"><a name="l00878"></a><span class="lineno">  878</span>&#160;      <span class="comment">//  (ported from Win95 ctlmgr.c)</span></div>
<div class="line"><a name="l00879"></a><span class="lineno">  879</span>&#160;      <span class="comment">//</span></div>
<div class="line"><a name="l00880"></a><span class="lineno">  880</span>&#160;      cxPrefixes = KKGetPrefixWidth(hdc,lpchStr,cchCount) - (iPrefixCount * iOverhang);</div>
<div class="line"><a name="l00881"></a><span class="lineno">  881</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00882"></a><span class="lineno">  882</span>&#160;      cxPrefixes = UserGetTextExtentPointW(hdc, &amp;PrefixChar, 1, &amp;size);</div>
<div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;      cxPrefixes = size.cx - iOverhang;</div>
<div class="line"><a name="l00884"></a><span class="lineno">  884</span>&#160;      cxPrefixes *=  iPrefixCount;</div>
<div class="line"><a name="l00885"></a><span class="lineno">  885</span>&#160;<span class="preprocessor">#endif // FE_SB</span></div>
<div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;    }</div>
<div class="line"><a name="l00887"></a><span class="lineno">  887</span>&#160;  UserGetTextExtentPointW(hdc, lpchStr, cchCount, &amp;size);</div>
<div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;  <span class="keywordflow">return</span> (size.cx - cxPrefixes);</div>
<div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l00761">GetPrefixCount()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01492">AddEllipsisAndDrawLine()</a>, <a class="el" href="a03224_source.html#l01420">AddPathEllipsis()</a>, <a class="el" href="a03224_source.html#l01170">DT_BreakAWord()</a>, <a class="el" href="a03224_source.html#l00900">DT_DrawStr()</a> , 以及 <a class="el" href="a03224_source.html#l01311">NeedsEndEllipsis()</a>.</p>

</div>
</div>
<a id="a44d8495062e6993b1d8061e8cfa5488d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44d8495062e6993b1d8061e8cfa5488d">&#9670;&nbsp;</a></span>DT_GetLineBreak()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LPWSTR DT_GetLineBreak </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hdc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpchLineStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cchCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>&#160;</td>
          <td class="paramname"><em>dwFormat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPINT&#160;</td>
          <td class="paramname"><em>lpiLineLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a>&#160;</td>
          <td class="paramname"><em>lpDrawInfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l01201">1201</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>&#160;{</div>
<div class="line"><a name="l01209"></a><span class="lineno"> 1209</span>&#160;  LPCWSTR lpchText, lpchEnd, lpch, lpchLineEnd;</div>
<div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>&#160;  <span class="keywordtype">int</span>   cxStart, cxExtent, cxNewExtent;</div>
<div class="line"><a name="l01211"></a><span class="lineno"> 1211</span>&#160;  BOOL  fAdjustWhiteSpaces = FALSE;</div>
<div class="line"><a name="l01212"></a><span class="lineno"> 1212</span>&#160;  WCHAR  ch;</div>
<div class="line"><a name="l01213"></a><span class="lineno"> 1213</span>&#160;<span class="preprocessor">#ifdef FE_SB // DT_GetLineBreak()</span></div>
<div class="line"><a name="l01214"></a><span class="lineno"> 1214</span>&#160;  <a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dwCodePage = <a class="code" href="a00941.html#acc0cc89d3e9afc8f6308f08c48f27f4f">UserGetCodePage</a>(hdc);</div>
<div class="line"><a name="l01215"></a><span class="lineno"> 1215</span>&#160;<span class="preprocessor">#endif // FE_SB</span></div>
<div class="line"><a name="l01216"></a><span class="lineno"> 1216</span>&#160; </div>
<div class="line"><a name="l01217"></a><span class="lineno"> 1217</span>&#160;  cxStart = lpDrawInfo-&gt;rcFormat.left;</div>
<div class="line"><a name="l01218"></a><span class="lineno"> 1218</span>&#160;  cxExtent = cxNewExtent = 0;</div>
<div class="line"><a name="l01219"></a><span class="lineno"> 1219</span>&#160;  lpchText = lpchLineStart;</div>
<div class="line"><a name="l01220"></a><span class="lineno"> 1220</span>&#160;  lpchEnd = lpchLineStart + cchCount;</div>
<div class="line"><a name="l01221"></a><span class="lineno"> 1221</span>&#160; </div>
<div class="line"><a name="l01222"></a><span class="lineno"> 1222</span>&#160; </div>
<div class="line"><a name="l01223"></a><span class="lineno"> 1223</span>&#160;  <span class="keywordflow">while</span>(lpchText &lt; lpchEnd) {</div>
<div class="line"><a name="l01224"></a><span class="lineno"> 1224</span>&#160;<span class="preprocessor">#ifdef FE_SB // DT_GetLineBreak()</span></div>
<div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>&#160;      lpchLineEnd = lpch = <a class="code" href="a03224.html#a17ac4a763de37779b30785dfab165bd3">GetNextWordbreak</a>(dwCodePage,lpchText, lpchEnd, (dwFormat &amp; DT_WORDBREAK));</div>
<div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>&#160;      lpchLineEnd = lpch = <a class="code" href="a03224.html#a17ac4a763de37779b30785dfab165bd3">GetNextWordbreak</a>(0,lpchText, lpchEnd, (dwFormat &amp; DT_WORDBREAK));</div>
<div class="line"><a name="l01228"></a><span class="lineno"> 1228</span>&#160;<span class="preprocessor">#endif // FE_SB</span></div>
<div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>&#160;      <span class="comment">// DT_DrawStr does not return the overhang; Otherwise we will end up</span></div>
<div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>&#160;      <span class="comment">// adding one overhang for every word in the string.</span></div>
<div class="line"><a name="l01231"></a><span class="lineno"> 1231</span>&#160; </div>
<div class="line"><a name="l01232"></a><span class="lineno"> 1232</span>&#160;      <span class="comment">// For simulated Bold fonts, the summation of extents of individual</span></div>
<div class="line"><a name="l01233"></a><span class="lineno"> 1233</span>&#160;      <span class="comment">// words in a line is greater than the extent of the whole line. So,</span></div>
<div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>&#160;      <span class="comment">// always calculate extent from the LineStart.</span></div>
<div class="line"><a name="l01235"></a><span class="lineno"> 1235</span>&#160;      <span class="comment">// BUGTAG: #6054 -- Win95B -- SANKAR -- 3/9/95 --</span></div>
<div class="line"><a name="l01236"></a><span class="lineno"> 1236</span>&#160;      cxNewExtent = <a class="code" href="a03224.html#a05adba5e1573b32335f8496037f88441">DT_DrawStr</a>(hdc, cxStart, 0, lpchLineStart, (<span class="keywordtype">int</span>)(((PBYTE)lpch - (PBYTE)lpchLineStart)/<span class="keyword">sizeof</span>(WCHAR)), FALSE,</div>
<div class="line"><a name="l01237"></a><span class="lineno"> 1237</span>&#160;                 dwFormat, lpDrawInfo);</div>
<div class="line"><a name="l01238"></a><span class="lineno"> 1238</span>&#160; </div>
<div class="line"><a name="l01239"></a><span class="lineno"> 1239</span>&#160;      <span class="keywordflow">if</span> ((dwFormat &amp; DT_WORDBREAK) &amp;&amp; ((cxNewExtent + lpDrawInfo-&gt;cxOverhang) &gt; lpDrawInfo-&gt;cxMaxWidth)) {</div>
<div class="line"><a name="l01240"></a><span class="lineno"> 1240</span>&#160;          <span class="comment">// Are there more than one word in this line?</span></div>
<div class="line"><a name="l01241"></a><span class="lineno"> 1241</span>&#160;          <span class="keywordflow">if</span> (lpchText != lpchLineStart)  {</div>
<div class="line"><a name="l01242"></a><span class="lineno"> 1242</span>&#160;              lpchLineEnd = lpch = lpchText;</div>
<div class="line"><a name="l01243"></a><span class="lineno"> 1243</span>&#160;              fAdjustWhiteSpaces = TRUE;</div>
<div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>&#160;          } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01245"></a><span class="lineno"> 1245</span>&#160;              <span class="comment">//One word is longer than the maximum width permissible.</span></div>
<div class="line"><a name="l01246"></a><span class="lineno"> 1246</span>&#160;              <span class="comment">//See if we are allowed to break that single word.</span></div>
<div class="line"><a name="l01247"></a><span class="lineno"> 1247</span>&#160;              <span class="keywordflow">if</span>((dwFormat &amp; DT_EDITCONTROL) &amp;&amp; (!(dwFormat &amp; DT_WORD_ELLIPSIS))) {</div>
<div class="line"><a name="l01248"></a><span class="lineno"> 1248</span>&#160;                  lpchLineEnd = lpch = <a class="code" href="a03224.html#a372cd9491d5e2afd7f98e57f68dfd905">DT_BreakAWord</a>(hdc, lpchText, (<span class="keywordtype">int</span>)(((PBYTE)lpch - (PBYTE)lpchText)/<span class="keyword">sizeof</span>(WCHAR)),</div>
<div class="line"><a name="l01249"></a><span class="lineno"> 1249</span>&#160;                        lpDrawInfo-&gt;cxMaxWidth - cxExtent,</div>
<div class="line"><a name="l01250"></a><span class="lineno"> 1250</span>&#160;                        dwFormat,</div>
<div class="line"><a name="l01251"></a><span class="lineno"> 1251</span>&#160;                        lpDrawInfo-&gt;cxOverhang); <span class="comment">//Break that word</span></div>
<div class="line"><a name="l01252"></a><span class="lineno"> 1252</span>&#160;                  <span class="comment">//Note: Since we broke in the middle of a word, no need to</span></div>
<div class="line"><a name="l01253"></a><span class="lineno"> 1253</span>&#160;                  <span class="comment">// adjust for white spaces.</span></div>
<div class="line"><a name="l01254"></a><span class="lineno"> 1254</span>&#160;              } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01255"></a><span class="lineno"> 1255</span>&#160;                  fAdjustWhiteSpaces = TRUE;</div>
<div class="line"><a name="l01256"></a><span class="lineno"> 1256</span>&#160;                  <span class="comment">// Check if we need to end this line with ellipsis</span></div>
<div class="line"><a name="l01257"></a><span class="lineno"> 1257</span>&#160;                  <span class="keywordflow">if</span>(dwFormat &amp; DT_WORD_ELLIPSIS)</div>
<div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>&#160;                    {</div>
<div class="line"><a name="l01259"></a><span class="lineno"> 1259</span>&#160;                      <span class="comment">// Don&#39;t do this if already at the end of the string.</span></div>
<div class="line"><a name="l01260"></a><span class="lineno"> 1260</span>&#160;                      <span class="keywordflow">if</span> (lpch &lt; lpchEnd)</div>
<div class="line"><a name="l01261"></a><span class="lineno"> 1261</span>&#160;                        {</div>
<div class="line"><a name="l01262"></a><span class="lineno"> 1262</span>&#160;                          <span class="comment">// If there are CR/LF at the end, skip them.</span></div>
<div class="line"><a name="l01263"></a><span class="lineno"> 1263</span>&#160;                          <span class="keywordflow">if</span> ((ch = *lpch) == <a class="code" href="a03224.html#a876ce77f3c672c7162658151e648389e">CR</a> || ch == <a class="code" href="a03224.html#a350c9d6cb81908d59427ee96844d1a9c">LF</a>)</div>
<div class="line"><a name="l01264"></a><span class="lineno"> 1264</span>&#160;                            {</div>
<div class="line"><a name="l01265"></a><span class="lineno"> 1265</span>&#160;                              <span class="keywordflow">if</span> ((++lpch &lt; lpchEnd) &amp;&amp; (*lpch == (WCHAR)(ch ^ (<a class="code" href="a03224.html#a350c9d6cb81908d59427ee96844d1a9c">LF</a> ^ <a class="code" href="a03224.html#a876ce77f3c672c7162658151e648389e">CR</a>))))</div>
<div class="line"><a name="l01266"></a><span class="lineno"> 1266</span>&#160;                                  lpch++;</div>
<div class="line"><a name="l01267"></a><span class="lineno"> 1267</span>&#160;                              fAdjustWhiteSpaces = FALSE;</div>
<div class="line"><a name="l01268"></a><span class="lineno"> 1268</span>&#160;                            }</div>
<div class="line"><a name="l01269"></a><span class="lineno"> 1269</span>&#160;                        }</div>
<div class="line"><a name="l01270"></a><span class="lineno"> 1270</span>&#160;                    }</div>
<div class="line"><a name="l01271"></a><span class="lineno"> 1271</span>&#160;              }</div>
<div class="line"><a name="l01272"></a><span class="lineno"> 1272</span>&#160;          }</div>
<div class="line"><a name="l01273"></a><span class="lineno"> 1273</span>&#160;          <span class="comment">// Well! We found a place to break the line. Let us break from this</span></div>
<div class="line"><a name="l01274"></a><span class="lineno"> 1274</span>&#160;          <span class="comment">// loop;</span></div>
<div class="line"><a name="l01275"></a><span class="lineno"> 1275</span>&#160;          <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01276"></a><span class="lineno"> 1276</span>&#160;      } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01277"></a><span class="lineno"> 1277</span>&#160;          <span class="comment">// Don&#39;t do this if already at the end of the string.</span></div>
<div class="line"><a name="l01278"></a><span class="lineno"> 1278</span>&#160;          <span class="keywordflow">if</span> (lpch &lt; lpchEnd) {</div>
<div class="line"><a name="l01279"></a><span class="lineno"> 1279</span>&#160;              <span class="keywordflow">if</span> ((ch = *lpch) == <a class="code" href="a03224.html#a876ce77f3c672c7162658151e648389e">CR</a> || ch == <a class="code" href="a03224.html#a350c9d6cb81908d59427ee96844d1a9c">LF</a>) {</div>
<div class="line"><a name="l01280"></a><span class="lineno"> 1280</span>&#160;                  <span class="keywordflow">if</span> ((++lpch &lt; lpchEnd) &amp;&amp; (*lpch == (WCHAR)(ch ^ (<a class="code" href="a03224.html#a350c9d6cb81908d59427ee96844d1a9c">LF</a> ^ <a class="code" href="a03224.html#a876ce77f3c672c7162658151e648389e">CR</a>))))</div>
<div class="line"><a name="l01281"></a><span class="lineno"> 1281</span>&#160;                      lpch++;</div>
<div class="line"><a name="l01282"></a><span class="lineno"> 1282</span>&#160;                  fAdjustWhiteSpaces = FALSE;</div>
<div class="line"><a name="l01283"></a><span class="lineno"> 1283</span>&#160;                  <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01284"></a><span class="lineno"> 1284</span>&#160;              }</div>
<div class="line"><a name="l01285"></a><span class="lineno"> 1285</span>&#160;          }</div>
<div class="line"><a name="l01286"></a><span class="lineno"> 1286</span>&#160;      }</div>
<div class="line"><a name="l01287"></a><span class="lineno"> 1287</span>&#160; </div>
<div class="line"><a name="l01288"></a><span class="lineno"> 1288</span>&#160;      <span class="comment">// Point at the beginning of the next word.</span></div>
<div class="line"><a name="l01289"></a><span class="lineno"> 1289</span>&#160;      lpchText = lpch;</div>
<div class="line"><a name="l01290"></a><span class="lineno"> 1290</span>&#160;      cxExtent = cxNewExtent;</div>
<div class="line"><a name="l01291"></a><span class="lineno"> 1291</span>&#160;  }</div>
<div class="line"><a name="l01292"></a><span class="lineno"> 1292</span>&#160; </div>
<div class="line"><a name="l01293"></a><span class="lineno"> 1293</span>&#160;  <span class="comment">// Calculate the length of current line.</span></div>
<div class="line"><a name="l01294"></a><span class="lineno"> 1294</span>&#160;  *lpiLineLength = ((PBYTE)lpchLineEnd - (PBYTE)lpchLineStart)/<span class="keyword">sizeof</span>(WCHAR);</div>
<div class="line"><a name="l01295"></a><span class="lineno"> 1295</span>&#160; </div>
<div class="line"><a name="l01296"></a><span class="lineno"> 1296</span>&#160;  <span class="comment">// Adjust the line length and lpch to take care of spaces.</span></div>
<div class="line"><a name="l01297"></a><span class="lineno"> 1297</span>&#160;  <span class="keywordflow">if</span>(fAdjustWhiteSpaces &amp;&amp; (lpch &lt; lpchEnd))</div>
<div class="line"><a name="l01298"></a><span class="lineno"> 1298</span>&#160;      lpch = <a class="code" href="a03224.html#afaad18d6511aeb4e5f0f2e6b9db4bdea">DT_AdjustWhiteSpaces</a>(lpch, lpiLineLength, dwFormat);</div>
<div class="line"><a name="l01299"></a><span class="lineno"> 1299</span>&#160; </div>
<div class="line"><a name="l01300"></a><span class="lineno"> 1300</span>&#160;  <span class="comment">// return the begining of next line;</span></div>
<div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>&#160;  <span class="keywordflow">return</span> (LPWSTR)lpch;</div>
<div class="line"><a name="l01302"></a><span class="lineno"> 1302</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l00016">CR</a>, <a class="el" href="a03224_source.html#l01131">DT_AdjustWhiteSpaces()</a>, <a class="el" href="a03224_source.html#l01170">DT_BreakAWord()</a>, <a class="el" href="a03224_source.html#l00900">DT_DrawStr()</a>, <a class="el" href="a00563_source.html#l00175">DWORD</a>, <a class="el" href="a03224_source.html#l00649">GetNextWordbreak()</a>, <a class="el" href="a03224_source.html#l00017">LF</a> , 以及 <a class="el" href="a00941.html#acc0cc89d3e9afc8f6308f08c48f27f4f">UserGetCodePage()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01575">DrawTextExW()</a>.</p>

</div>
</div>
<a id="a02d920d30320f1aa0e9ef66ef1fc6117"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02d920d30320f1aa0e9ef66ef1fc6117">&#9670;&nbsp;</a></span>DT_InitDrawTextInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL DT_InitDrawTextInfo </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hdc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPRECT&#160;</td>
          <td class="paramname"><em>lprc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wFormat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a>&#160;</td>
          <td class="paramname"><em>lpDrawInfo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPDRAWTEXTPARAMS&#160;</td>
          <td class="paramname"><em>lpDTparams</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00997">997</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160;{</div>
<div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160;  SIZE   sizeViewPortExt,sizeWindowExt;</div>
<div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160;  TEXTMETRICW tm;</div>
<div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160;  LPRECT      lprcDest;</div>
<div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;  <span class="keywordtype">int</span>         iTabLength = 8;   <span class="comment">// Default Tab length is 8 characters.</span></div>
<div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;  <span class="keywordtype">int</span>         iLeftMargin;</div>
<div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;  <span class="keywordtype">int</span>         iRightMargin;</div>
<div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;  BOOL        fUseSystemFont;</div>
<div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160; </div>
<div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;  <span class="keywordflow">if</span> (lpDTparams) {</div>
<div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;      <span class="comment">/*</span></div>
<div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160;<span class="comment">       *  Only if DT_TABSTOP flag is mentioned, we must use the iTabLength field.</span></div>
<div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>&#160;<span class="comment">       */</span></div>
<div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;      <span class="keywordflow">if</span> (wFormat &amp; DT_TABSTOP)</div>
<div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160;          iTabLength = lpDTparams-&gt;iTabLength;</div>
<div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;      iLeftMargin = lpDTparams-&gt;iLeftMargin;</div>
<div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160;      iRightMargin = lpDTparams-&gt;iRightMargin;</div>
<div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;  } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160;      iLeftMargin = iRightMargin = 0;</div>
<div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160;  }</div>
<div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160; </div>
<div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160;  <span class="comment">/*</span></div>
<div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>&#160;<span class="comment">   *  Get the View port and Window extents for the given DC</span></div>
<div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160;<span class="comment">   *  If this call fails, hdc must be invalid</span></div>
<div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160;<span class="comment">   */</span></div>
<div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>&#160;  <span class="keywordflow">if</span> (!UserGetViewportExtEx(hdc,&amp;sizeViewPortExt))</div>
<div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160;    <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;  UserGetWindowExtEx(hdc, &amp;sizeWindowExt);</div>
<div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160; </div>
<div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;  <span class="comment">/*</span></div>
<div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;<span class="comment">   *  For the current mapping mode,  find out the sign of x from left to right.</span></div>
<div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160;<span class="comment">   */</span></div>
<div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>&#160;  lpDrawInfo-&gt;iXSign =</div>
<div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160;      (((sizeViewPortExt.cx ^ sizeWindowExt.cx) &amp; 0x80000000) ? -1 : 1);</div>
<div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160; </div>
<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;  <span class="comment">/*</span></div>
<div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;<span class="comment">   *  For the current mapping mode,  find out the sign of y from top to bottom.</span></div>
<div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160;<span class="comment">   */</span></div>
<div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160;  lpDrawInfo-&gt;iYSign =</div>
<div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>&#160;      (((sizeViewPortExt.cy ^ sizeWindowExt.cy) &amp; 0x80000000) ? -1 : 1);</div>
<div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>&#160; </div>
<div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160;  <span class="comment">/*</span></div>
<div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>&#160;<span class="comment">   *  Calculate the dimensions of the current font in this DC.</span></div>
<div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>&#160;<span class="comment">   * (If it is SysFont AND the mapping mode is MM_TEXT, use system font&#39;s data)</span></div>
<div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>&#160;<span class="comment">   */</span></div>
<div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>&#160;  fUseSystemFont = ((wFormat &amp; DT_INTERNAL) || <a class="code" href="a03224.html#adb66e3ffa3f7a55c481165ca226efa3e">IsSysFontAndDefaultMode</a>(hdc));</div>
<div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160;  <span class="keywordflow">if</span> (!fUseSystemFont) {</div>
<div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;      <span class="comment">/*</span></div>
<div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160;<span class="comment">       *  Edit controls have their own way of calculating the aveCharWidth.</span></div>
<div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160;<span class="comment">       */</span></div>
<div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>&#160;      <span class="keywordflow">if</span> (wFormat &amp; DT_EDITCONTROL) {</div>
<div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160;          tm.tmAveCharWidth = UserGetCharDimensionsW(hdc, &amp;tm, NULL);</div>
<div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>&#160;          <span class="keywordflow">if</span> (tm.tmAveCharWidth == 0) {</div>
<div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>&#160;              fUseSystemFont = TRUE;</div>
<div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>&#160;          }</div>
<div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>&#160;      } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!UserGetTextMetricsW(hdc, &amp;tm)) {</div>
<div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;          <span class="comment">/*</span></div>
<div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>&#160;<span class="comment">           * This can fail in a hard error popup during logon or logoff</span></div>
<div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160;<span class="comment">           * because UpdatePerUserSystemParameters destroys the server-side</span></div>
<div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160;<span class="comment">           * font handle for the DC, and a repaint occurs before we switch</span></div>
<div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>&#160;<span class="comment">           * desktops (the switch recreates the popup from scratch with the</span></div>
<div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>&#160;<span class="comment">           * new font OK). ChrisWil&#39;s changes to move system-wide attributes</span></div>
<div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>&#160;<span class="comment">           * into desktops should take care of this in Kernel-mode.  This is</span></div>
<div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>&#160;<span class="comment">           * just a horrible, horrible hack for now.</span></div>
<div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>&#160;<span class="comment">           */</span></div>
<div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160;          <a class="code" href="a00371.html#a01c4659626880ba56745765a3580a36b">RIPMSG0</a>(<a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>, <span class="stringliteral">&quot;UserGetTextMetricsW failed: only in logon/off?\n&quot;</span>);</div>
<div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>&#160;          tm.tmOverhang = 0;</div>
<div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160; </div>
<div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>&#160;          <span class="comment">/*</span></div>
<div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>&#160;<span class="comment">           * We should probably set fUseSystemFont to TRUE here. But I</span></div>
<div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>&#160;<span class="comment">           *  assume that this &quot;horrible hack&quot; works fine plus it has been</span></div>
<div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160;<span class="comment">           *  here for good. So I&#39;ll leave it alone. 6/3/96</span></div>
<div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>&#160;<span class="comment">           */</span></div>
<div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>&#160;      }</div>
<div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>&#160;  }</div>
<div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>&#160; </div>
<div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>&#160;  <span class="keywordflow">if</span> (fUseSystemFont) {</div>
<div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160;      <span class="comment">/*</span></div>
<div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>&#160;<span class="comment">       *  Avoid GetTextMetrics for internal calls since they use sys font.</span></div>
<div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160;<span class="comment">       */</span></div>
<div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;      tm.tmHeight = <a class="code" href="a00020.html#ad760da1dd81d9e84dee607d18edfde39">gpsi</a>-&gt;<a class="code" href="a02513.html#a481a03e7eb24994f1eca28391f9b7c77">cySysFontChar</a>;</div>
<div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160;      tm.tmExternalLeading = <a class="code" href="a00020.html#ad760da1dd81d9e84dee607d18edfde39">gpsi</a>-&gt;<a class="code" href="a02513.html#a4bd85c2f52f502cc32a9bfb9004694ad">tmSysFont</a>.tmExternalLeading;</div>
<div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>&#160;      tm.tmAveCharWidth = <a class="code" href="a00020.html#ad760da1dd81d9e84dee607d18edfde39">gpsi</a>-&gt;<a class="code" href="a02513.html#a4bd85c2f52f502cc32a9bfb9004694ad">tmSysFont</a>.tmAveCharWidth;</div>
<div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>&#160;      tm.tmOverhang = <a class="code" href="a00020.html#ad760da1dd81d9e84dee607d18edfde39">gpsi</a>-&gt;<a class="code" href="a02513.html#a4bd85c2f52f502cc32a9bfb9004694ad">tmSysFont</a>.tmOverhang;</div>
<div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>&#160;  }</div>
<div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>&#160; </div>
<div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>&#160; </div>
<div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>&#160;  <span class="comment">// cyLineHeight is in pixels (This will be signed).</span></div>
<div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>&#160;  lpDrawInfo-&gt;cyLineHeight = (tm.tmHeight +</div>
<div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>&#160;            ((wFormat &amp; DT_EXTERNALLEADING) ? tm.tmExternalLeading : 0)) *</div>
<div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160;            lpDrawInfo-&gt;iYSign;</div>
<div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160; </div>
<div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160;  <span class="comment">// cxTabLength is the tab length in pixels (This will not be signed)</span></div>
<div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>&#160;  lpDrawInfo-&gt;cxTabLength = tm.tmAveCharWidth * iTabLength;</div>
<div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>&#160; </div>
<div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>&#160;  <span class="comment">// Set the cxOverhang</span></div>
<div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>&#160;  lpDrawInfo-&gt;cxOverhang = tm.tmOverhang;</div>
<div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>&#160; </div>
<div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>&#160;  <span class="comment">// Pick up the proper TextOut function based on the prefix processing reqd.</span></div>
<div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>&#160;  lpDrawInfo-&gt;lpfnTextDraw = ((wFormat &amp; DT_NOPREFIX) ? (<a class="code" href="a03224.html#af62cc60e4e13ee2561c02fc3a68fda26">LPFNTEXTDRAW</a>)UserTextOutW : <a class="code" href="a03224.html#aa31ce455c47e43d3d4cb796dc59e47d5">PSMTextOut</a>);</div>
<div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>&#160; </div>
<div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;  <span class="comment">// Set up the format rectangle based on the margins.</span></div>
<div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>&#160;<span class="comment">//  LCopyStruct(lprc, lprcDest = (LPRECT)&amp;(lpDrawInfo-&gt;rcFormat), sizeof(RECT));</span></div>
<div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;  lprcDest = &amp;(lpDrawInfo-&gt;rcFormat);</div>
<div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;  *lprcDest = *lprc;</div>
<div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>&#160; </div>
<div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160;  <span class="comment">// We need to do the following only if the margins are given</span></div>
<div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160;  <span class="keywordflow">if</span>(iLeftMargin | iRightMargin) {</div>
<div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160;      lprcDest-&gt;left += iLeftMargin * lpDrawInfo-&gt;iXSign;</div>
<div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160;      lprcDest-&gt;right -= (lpDrawInfo-&gt;cxRightMargin = iRightMargin * lpDrawInfo-&gt;iXSign);</div>
<div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>&#160;    } <span class="keywordflow">else</span></div>
<div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>&#160;      lpDrawInfo-&gt;cxRightMargin = 0;  <span class="comment">// Initialize to zero.</span></div>
<div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>&#160; </div>
<div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>&#160;  <span class="comment">// cxMaxWidth is unsigned.</span></div>
<div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>&#160;  lpDrawInfo-&gt;cxMaxWidth = (lprcDest-&gt;right - lprcDest-&gt;left) * lpDrawInfo-&gt;iXSign;</div>
<div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>&#160;  lpDrawInfo-&gt;cxMaxExtent = 0;  <span class="comment">// Initialize this to zero.</span></div>
<div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>&#160; </div>
<div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>&#160;  <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l01121"></a><span class="lineno"> 1121</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l01014">tagSERVERINFO::cySysFontChar</a>, <a class="el" href="a00020_source.html#l00039">gpsi</a>, <a class="el" href="a03224_source.html#l01971">IsSysFontAndDefaultMode()</a>, <a class="el" href="a03224_source.html#l01867">PSMTextOut()</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a>, <a class="el" href="a00371_source.html#l00131">RIPMSG0</a> , 以及 <a class="el" href="a00365_source.html#l01017">tagSERVERINFO::tmSysFont</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01575">DrawTextExW()</a>.</p>

</div>
</div>
<a id="a17ac4a763de37779b30785dfab165bd3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17ac4a763de37779b30785dfab165bd3">&#9670;&nbsp;</a></span>GetNextWordbreak()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LPCWSTR GetNextWordbreak </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>&#160;</td>
          <td class="paramname"><em>dwCodePage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpchEnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fBreakSpace</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00649">649</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;{</div>
<div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;    <span class="keywordtype">int</span> ichNonWhite;</div>
<div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160; </div>
<div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;  <span class="comment">/* ichNonWhite is used to make sure we always make progress. */</span></div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;  ichNonWhite = 1;</div>
<div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160; </div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;  <span class="comment">// We must terminate this loop before lpch == lpchEnd, otherwise, we</span></div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;  <span class="comment">// may gp fault during *lpch.</span></div>
<div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;  <span class="keywordflow">while</span> (lpch &lt; lpchEnd) {</div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;      <span class="keywordflow">switch</span> (*lpch) {</div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;          <span class="keywordflow">case</span> <a class="code" href="a03224.html#a876ce77f3c672c7162658151e648389e">CR</a>:</div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;          <span class="keywordflow">case</span> <a class="code" href="a03224.html#a350c9d6cb81908d59427ee96844d1a9c">LF</a>:</div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;              <span class="keywordflow">return</span> lpch;</div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160; </div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;          <span class="keywordflow">case</span> <span class="charliteral">&#39;\t&#39;</span>:</div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;          <span class="keywordflow">case</span> <span class="charliteral">&#39; &#39;</span>:</div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;              <span class="keywordflow">if</span> (fBreakSpace)</div>
<div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;                  <span class="keywordflow">return</span> (lpch + ichNonWhite);</div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160; </div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160; </div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;          <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160; </div>
<div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;<span class="preprocessor">#ifdef FE_SB // GetNextWordbreak()</span></div>
<div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;              <span class="comment">/*</span></div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;<span class="comment">               * Since most Jpanese writing don&#39;t use space character</span></div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;<span class="comment">               * to separate each word, we define each Kanji character</span></div>
<div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;<span class="comment">               * as a word.</span></div>
<div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;<span class="comment">               */</span></div>
<div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;              <span class="keywordflow">if</span> (fBreakSpace &amp;&amp; <a class="code" href="a00941.html#a7969a74763219acebef29e9d4d64ab58">UserIsFullWidth</a>(dwCodePage,*lpch)) {</div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;                  <span class="keywordflow">if</span> (!ichNonWhite)</div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;                      <span class="keywordflow">return</span> lpch;</div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;                  <span class="comment">/*</span></div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;<span class="comment">                   * if the next character is the last character of this string,</span></div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;<span class="comment">                   * We return the character, even this is a &quot;KINSOKU&quot; charcter...</span></div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;<span class="comment">                   */</span></div>
<div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;                  <span class="keywordflow">if</span> ((lpch+1) != lpchEnd) {</div>
<div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;                      <span class="comment">/*</span></div>
<div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;<span class="comment">                       * Check next character of FullWidth character.</span></div>
<div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;<span class="comment">                       * if the next character is &quot;KINSOKU&quot; character, the character</span></div>
<div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;<span class="comment">                       * should be handled as a part of previous FullWIdth character.</span></div>
<div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;<span class="comment">                       * Never handle is as A character, and should not be a Word also.</span></div>
<div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;<span class="comment">                       */</span></div>
<div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;                      <span class="keywordflow">if</span> (<a class="code" href="a00941.html#abf3730a9dfc3b1651f028907e43cb865">UserIsFELineBreak</a>(dwCodePage,*(lpch+1))) {</div>
<div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;                          <span class="comment">/*</span></div>
<div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;<span class="comment">                           * Then if the character is &quot;KINSOKU&quot; character, we return</span></div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;<span class="comment">                           * the next of this character,...</span></div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;<span class="comment">                           */</span></div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;                          <span class="keywordflow">return</span> (lpch + 1 + 1);</div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;                      }</div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;                  }</div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;                  <span class="comment">/*</span></div>
<div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;<span class="comment">                   * Otherwise, we just return the chracter that is next of FullWidth</span></div>
<div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;<span class="comment">                   * Character. Because we treat A FullWidth chacter as A Word.</span></div>
<div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;<span class="comment">                   */</span></div>
<div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;                  <span class="keywordflow">return</span> (lpch + 1);</div>
<div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;              }</div>
<div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;<span class="preprocessor">#endif // FE_SB</span></div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;              lpch++;</div>
<div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;              ichNonWhite = 0;</div>
<div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;        }</div>
<div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;    }</div>
<div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160; </div>
<div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;  <span class="keywordflow">return</span> lpch;</div>
<div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160; </div>
<div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;<span class="preprocessor">#ifdef FE_SB // GetNextWordbreak()</span></div>
<div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;  UNREFERENCED_PARAMETER(dwCodePage);</div>
<div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;<span class="preprocessor">#endif // FE_SB</span></div>
<div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l00016">CR</a>, <a class="el" href="a03224_source.html#l00017">LF</a>, <a class="el" href="a00941.html#abf3730a9dfc3b1651f028907e43cb865">UserIsFELineBreak()</a> , 以及 <a class="el" href="a00941.html#a7969a74763219acebef29e9d4d64ab58">UserIsFullWidth()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01201">DT_GetLineBreak()</a>.</p>

</div>
</div>
<a id="af7eb24aded300703b63d9542295f214f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7eb24aded300703b63d9542295f214f">&#9670;&nbsp;</a></span>GetPrefixCount()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LONG GetPrefixCount </td>
          <td>(</td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpstr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPWSTR&#160;</td>
          <td class="paramname"><em>lpstrCopy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>charcopycount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00761">761</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;{</div>
<div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;    <span class="keywordtype">int</span> chprintpos = 0;         <span class="comment">/* Num of chars that will be printed */</span></div>
<div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;    <span class="keywordtype">int</span> chcount = 0;            <span class="comment">/* Num of prefix chars that will be removed */</span></div>
<div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;    <span class="keywordtype">int</span> chprefixloc = -1;       <span class="comment">/* Pos (in printed chars) of the prefix */</span></div>
<div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;    WCHAR ch;</div>
<div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160; </div>
<div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;<span class="comment">     * If not copying, use a large bogus count...</span></div>
<div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;    <span class="keywordflow">if</span> (lpstrCopy == NULL)</div>
<div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;        charcopycount = 32767;</div>
<div class="line"><a name="l00777"></a><span class="lineno">  777</span>&#160; </div>
<div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;    <span class="keywordflow">while</span> ((cch-- &gt; 0) &amp;&amp; *lpstr &amp;&amp; charcopycount-- != 0) {</div>
<div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160; </div>
<div class="line"><a name="l00780"></a><span class="lineno">  780</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;<span class="comment">         * Is this guy a prefix character ?</span></div>
<div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00783"></a><span class="lineno">  783</span>&#160;        <span class="keywordflow">if</span> ((ch = *lpstr++) == CH_PREFIX) {</div>
<div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160; </div>
<div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;<span class="comment">             * Yup - increment the count of characters removed during print.</span></div>
<div class="line"><a name="l00787"></a><span class="lineno">  787</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;            chcount++;</div>
<div class="line"><a name="l00789"></a><span class="lineno">  789</span>&#160; </div>
<div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;<span class="comment">             * Is the next also a prefix char?</span></div>
<div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;            <span class="keywordflow">if</span> (*lpstr != CH_PREFIX) {</div>
<div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160; </div>
<div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;<span class="comment">                 * Nope - this is a real one, mark its location.</span></div>
<div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00798"></a><span class="lineno">  798</span>&#160;                chprefixloc = chprintpos;</div>
<div class="line"><a name="l00799"></a><span class="lineno">  799</span>&#160; </div>
<div class="line"><a name="l00800"></a><span class="lineno">  800</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160; </div>
<div class="line"><a name="l00802"></a><span class="lineno">  802</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;<span class="comment">                 * yup - simply copy it if copying.</span></div>
<div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160;                <span class="keywordflow">if</span> (lpstrCopy != NULL)</div>
<div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160;                    *(lpstrCopy++) = CH_PREFIX;</div>
<div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;                cch--;</div>
<div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;                lpstr++;</div>
<div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;                chprintpos++;</div>
<div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160;            }</div>
<div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160;<span class="preprocessor">#ifdef FE_SB // GetPrefixCount()</span></div>
<div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ch == CH_ENGLISHPREFIX) {</div>
<div class="line"><a name="l00813"></a><span class="lineno">  813</span>&#160; </div>
<div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00815"></a><span class="lineno">  815</span>&#160;<span class="comment">             * Yup - increment the count of characters removed during print.</span></div>
<div class="line"><a name="l00816"></a><span class="lineno">  816</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00817"></a><span class="lineno">  817</span>&#160;            chcount++;</div>
<div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160; </div>
<div class="line"><a name="l00819"></a><span class="lineno">  819</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160;<span class="comment">             * Next character is a real one, mark its location.</span></div>
<div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;            chprefixloc = chprintpos;</div>
<div class="line"><a name="l00823"></a><span class="lineno">  823</span>&#160; </div>
<div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ch == CH_KANJIPREFIX) {</div>
<div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160; </div>
<div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;<span class="comment">             * We only support Alpha Numeric(CH_ENGLISHPREFIX).</span></div>
<div class="line"><a name="l00828"></a><span class="lineno">  828</span>&#160;<span class="comment">             * no support for Kana(CH_KANJIPREFIX).</span></div>
<div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;<span class="comment">             * Yup - increment the count of characters removed during print.</span></div>
<div class="line"><a name="l00832"></a><span class="lineno">  832</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00833"></a><span class="lineno">  833</span>&#160;            chcount++;</div>
<div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160; </div>
<div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;            <span class="keywordflow">if</span>(cch) {</div>
<div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;                <span class="comment">/* don&#39;t copy the character */</span></div>
<div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;                chcount++;</div>
<div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160;                lpstr++;</div>
<div class="line"><a name="l00839"></a><span class="lineno">  839</span>&#160;                cch--;</div>
<div class="line"><a name="l00840"></a><span class="lineno">  840</span>&#160;            }</div>
<div class="line"><a name="l00841"></a><span class="lineno">  841</span>&#160;<span class="preprocessor">#endif // FE_SB</span></div>
<div class="line"><a name="l00842"></a><span class="lineno">  842</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00843"></a><span class="lineno">  843</span>&#160; </div>
<div class="line"><a name="l00844"></a><span class="lineno">  844</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00845"></a><span class="lineno">  845</span>&#160;<span class="comment">             * Nope - just inc count of char.  that will be printed</span></div>
<div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;            chprintpos++;</div>
<div class="line"><a name="l00848"></a><span class="lineno">  848</span>&#160;            <span class="keywordflow">if</span> (lpstrCopy != NULL)</div>
<div class="line"><a name="l00849"></a><span class="lineno">  849</span>&#160;                *(lpstrCopy++) = ch;</div>
<div class="line"><a name="l00850"></a><span class="lineno">  850</span>&#160;        }</div>
<div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;    }</div>
<div class="line"><a name="l00852"></a><span class="lineno">  852</span>&#160; </div>
<div class="line"><a name="l00853"></a><span class="lineno">  853</span>&#160;    <span class="keywordflow">if</span> (lpstrCopy != NULL)</div>
<div class="line"><a name="l00854"></a><span class="lineno">  854</span>&#160;        *lpstrCopy = 0;</div>
<div class="line"><a name="l00855"></a><span class="lineno">  855</span>&#160; </div>
<div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00857"></a><span class="lineno">  857</span>&#160;<span class="comment">     * Return the character counts</span></div>
<div class="line"><a name="l00858"></a><span class="lineno">  858</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00859"></a><span class="lineno">  859</span>&#160;    <span class="keywordflow">return</span> MAKELONG(chprefixloc, chcount);</div>
<div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">被这些函数引用 <a class="el" href="a00773_source.html#l00249">DrawMenuItemText()</a>, <a class="el" href="a03224_source.html#l00866">DT_GetExtentMinusPrefixes()</a>, <a class="el" href="a03701_source.html#l00031">PSMGetTextExtent()</a> , 以及 <a class="el" href="a03224_source.html#l01867">PSMTextOut()</a>.</p>

</div>
</div>
<a id="adb66e3ffa3f7a55c481165ca226efa3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb66e3ffa3f7a55c481165ca226efa3e">&#9670;&nbsp;</a></span>IsSysFontAndDefaultMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL IsSysFontAndDefaultMode </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hdc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l01971">1971</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l01972"></a><span class="lineno"> 1972</span>&#160;{</div>
<div class="line"><a name="l01973"></a><span class="lineno"> 1973</span>&#160;    <span class="keywordflow">return</span>((UserGetHFONT(hdc) == <a class="code" href="a00020.html#ae142b9698e40ef094e7481d595ddc9ae">ghFontSys</a>) &amp;&amp; (UserGetMapMode(hdc) == MM_TEXT));</div>
<div class="line"><a name="l01974"></a><span class="lineno"> 1974</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00020_source.html#l00101">ghFontSys</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l00997">DT_InitDrawTextInfo()</a> , 以及 <a class="el" href="a03218_source.html#l00171">TabTextOut()</a>.</p>

</div>
</div>
<a id="aed2de8c9634b17416e68c4fda014df94"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed2de8c9634b17416e68c4fda014df94">&#9670;&nbsp;</a></span>NeedsEndEllipsis()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL NeedsEndEllipsis </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hdc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpchText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPINT&#160;</td>
          <td class="paramname"><em>lpCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a>&#160;</td>
          <td class="paramname"><em>lpDTdata</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wFormat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l01311">1311</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l01316"></a><span class="lineno"> 1316</span>&#160;{</div>
<div class="line"><a name="l01317"></a><span class="lineno"> 1317</span>&#160;    <span class="keywordtype">int</span>   cchText;</div>
<div class="line"><a name="l01318"></a><span class="lineno"> 1318</span>&#160;    <span class="keywordtype">int</span>   ichMin, ichMax, ichMid;</div>
<div class="line"><a name="l01319"></a><span class="lineno"> 1319</span>&#160;    <span class="keywordtype">int</span>   cxMaxWidth;</div>
<div class="line"><a name="l01320"></a><span class="lineno"> 1320</span>&#160;    <span class="keywordtype">int</span>   iOverhang;</div>
<div class="line"><a name="l01321"></a><span class="lineno"> 1321</span>&#160;    <span class="keywordtype">int</span>   cxExtent;</div>
<div class="line"><a name="l01322"></a><span class="lineno"> 1322</span>&#160;    SIZE size;</div>
<div class="line"><a name="l01323"></a><span class="lineno"> 1323</span>&#160;    cchText = *lpCount;  <span class="comment">// Get the current count.</span></div>
<div class="line"><a name="l01324"></a><span class="lineno"> 1324</span>&#160; </div>
<div class="line"><a name="l01325"></a><span class="lineno"> 1325</span>&#160;    <span class="keywordflow">if</span> (cchText == 0)</div>
<div class="line"><a name="l01326"></a><span class="lineno"> 1326</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l01327"></a><span class="lineno"> 1327</span>&#160; </div>
<div class="line"><a name="l01328"></a><span class="lineno"> 1328</span>&#160;    cxMaxWidth  = lpDTdata-&gt;cxMaxWidth;</div>
<div class="line"><a name="l01329"></a><span class="lineno"> 1329</span>&#160;    iOverhang   = lpDTdata-&gt;cxOverhang;</div>
<div class="line"><a name="l01330"></a><span class="lineno"> 1330</span>&#160; </div>
<div class="line"><a name="l01331"></a><span class="lineno"> 1331</span>&#160;    cxExtent = <a class="code" href="a03224.html#a4e04593ff1f3b6675984ed4fa4b27f43">DT_GetExtentMinusPrefixes</a>(hdc, lpchText, cchText, wFormat, iOverhang);</div>
<div class="line"><a name="l01332"></a><span class="lineno"> 1332</span>&#160; </div>
<div class="line"><a name="l01333"></a><span class="lineno"> 1333</span>&#160;    <span class="keywordflow">if</span> (cxExtent &lt;= cxMaxWidth)</div>
<div class="line"><a name="l01334"></a><span class="lineno"> 1334</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l01335"></a><span class="lineno"> 1335</span>&#160;    <span class="comment">// Reserve room for the &quot;...&quot; ellipses;</span></div>
<div class="line"><a name="l01336"></a><span class="lineno"> 1336</span>&#160;    <span class="comment">// (Assumption: The ellipses don&#39;t have any prefixes!)</span></div>
<div class="line"><a name="l01337"></a><span class="lineno"> 1337</span>&#160;    UserGetTextExtentPointW(hdc, <a class="code" href="a03224.html#a0f3be14607d7bb854fd013841856ebc5">szEllipsis</a>, wcslen(<a class="code" href="a03224.html#a0f3be14607d7bb854fd013841856ebc5">szEllipsis</a>), &amp;size);</div>
<div class="line"><a name="l01338"></a><span class="lineno"> 1338</span>&#160;    cxMaxWidth -= size.cx - iOverhang;</div>
<div class="line"><a name="l01339"></a><span class="lineno"> 1339</span>&#160; </div>
<div class="line"><a name="l01340"></a><span class="lineno"> 1340</span>&#160;    <span class="comment">// If no room for ellipses, always show first character.</span></div>
<div class="line"><a name="l01341"></a><span class="lineno"> 1341</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l01342"></a><span class="lineno"> 1342</span>&#160;    ichMax = 1;</div>
<div class="line"><a name="l01343"></a><span class="lineno"> 1343</span>&#160;    <span class="keywordflow">if</span> (cxMaxWidth &gt; 0) {</div>
<div class="line"><a name="l01344"></a><span class="lineno"> 1344</span>&#160;        <span class="comment">// Binary search to find characters that will fit.</span></div>
<div class="line"><a name="l01345"></a><span class="lineno"> 1345</span>&#160;        ichMin = 0;</div>
<div class="line"><a name="l01346"></a><span class="lineno"> 1346</span>&#160;        ichMax = cchText;</div>
<div class="line"><a name="l01347"></a><span class="lineno"> 1347</span>&#160;        <span class="keywordflow">while</span> (ichMin &lt; ichMax) {</div>
<div class="line"><a name="l01348"></a><span class="lineno"> 1348</span>&#160;            <span class="comment">// Be sure to round up, to make sure we make progress in</span></div>
<div class="line"><a name="l01349"></a><span class="lineno"> 1349</span>&#160;            <span class="comment">// the loop if ichMax == ichMin + 1.</span></div>
<div class="line"><a name="l01350"></a><span class="lineno"> 1350</span>&#160;            <span class="comment">//</span></div>
<div class="line"><a name="l01351"></a><span class="lineno"> 1351</span>&#160;            ichMid = (ichMin + ichMax + 1) / 2;</div>
<div class="line"><a name="l01352"></a><span class="lineno"> 1352</span>&#160; </div>
<div class="line"><a name="l01353"></a><span class="lineno"> 1353</span>&#160;            cxExtent = <a class="code" href="a03224.html#a4e04593ff1f3b6675984ed4fa4b27f43">DT_GetExtentMinusPrefixes</a>(hdc, lpchText, ichMid, wFormat, iOverhang);</div>
<div class="line"><a name="l01354"></a><span class="lineno"> 1354</span>&#160; </div>
<div class="line"><a name="l01355"></a><span class="lineno"> 1355</span>&#160;            <span class="keywordflow">if</span> (cxExtent &lt; cxMaxWidth)</div>
<div class="line"><a name="l01356"></a><span class="lineno"> 1356</span>&#160;                ichMin = ichMid;</div>
<div class="line"><a name="l01357"></a><span class="lineno"> 1357</span>&#160;            <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01358"></a><span class="lineno"> 1358</span>&#160;                <span class="keywordflow">if</span> (cxExtent &gt; cxMaxWidth)</div>
<div class="line"><a name="l01359"></a><span class="lineno"> 1359</span>&#160;                    ichMax = ichMid - 1;</div>
<div class="line"><a name="l01360"></a><span class="lineno"> 1360</span>&#160;                <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01361"></a><span class="lineno"> 1361</span>&#160;                    <span class="comment">// Exact match up up to ichMid: just exit.</span></div>
<div class="line"><a name="l01362"></a><span class="lineno"> 1362</span>&#160;                    <span class="comment">//</span></div>
<div class="line"><a name="l01363"></a><span class="lineno"> 1363</span>&#160;                    ichMax = ichMid;</div>
<div class="line"><a name="l01364"></a><span class="lineno"> 1364</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01365"></a><span class="lineno"> 1365</span>&#160;                  }</div>
<div class="line"><a name="l01366"></a><span class="lineno"> 1366</span>&#160;              }</div>
<div class="line"><a name="l01367"></a><span class="lineno"> 1367</span>&#160;          }</div>
<div class="line"><a name="l01368"></a><span class="lineno"> 1368</span>&#160; </div>
<div class="line"><a name="l01369"></a><span class="lineno"> 1369</span>&#160;        <span class="comment">// Make sure we always show at least the first character...</span></div>
<div class="line"><a name="l01370"></a><span class="lineno"> 1370</span>&#160;        <span class="comment">//</span></div>
<div class="line"><a name="l01371"></a><span class="lineno"> 1371</span>&#160;        <span class="keywordflow">if</span> (ichMax &lt; 1)</div>
<div class="line"><a name="l01372"></a><span class="lineno"> 1372</span>&#160;            ichMax = 1;</div>
<div class="line"><a name="l01373"></a><span class="lineno"> 1373</span>&#160;      }</div>
<div class="line"><a name="l01374"></a><span class="lineno"> 1374</span>&#160; </div>
<div class="line"><a name="l01375"></a><span class="lineno"> 1375</span>&#160;    *lpCount = ichMax;</div>
<div class="line"><a name="l01376"></a><span class="lineno"> 1376</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l01377"></a><span class="lineno"> 1377</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l00866">DT_GetExtentMinusPrefixes()</a> , 以及 <a class="el" href="a03224_source.html#l00046">szEllipsis</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01492">AddEllipsisAndDrawLine()</a>.</p>

</div>
</div>
<a id="a2a0321e98ac1eef74c1fc4d7b0ecc269"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a0321e98ac1eef74c1fc4d7b0ecc269">&#9670;&nbsp;</a></span>PathFindFileName()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LPWSTR PathFindFileName </td>
          <td>(</td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>pPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cchText</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l01402">1402</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l01403"></a><span class="lineno"> 1403</span>&#160;{</div>
<div class="line"><a name="l01404"></a><span class="lineno"> 1404</span>&#160;    LPCWSTR pT;</div>
<div class="line"><a name="l01405"></a><span class="lineno"> 1405</span>&#160; </div>
<div class="line"><a name="l01406"></a><span class="lineno"> 1406</span>&#160;    <span class="keywordflow">for</span> (pT = pPath; cchText &gt; 0 &amp;&amp; *pPath; pPath++, cchText--) {</div>
<div class="line"><a name="l01407"></a><span class="lineno"> 1407</span>&#160;        <span class="keywordflow">if</span> ((pPath[0] == TEXT(<span class="charliteral">&#39;\\&#39;</span>) || pPath[0] == TEXT(<span class="charliteral">&#39;:&#39;</span>)) &amp;&amp; pPath[1])</div>
<div class="line"><a name="l01408"></a><span class="lineno"> 1408</span>&#160;            pT = pPath + 1;</div>
<div class="line"><a name="l01409"></a><span class="lineno"> 1409</span>&#160;    }</div>
<div class="line"><a name="l01410"></a><span class="lineno"> 1410</span>&#160; </div>
<div class="line"><a name="l01411"></a><span class="lineno"> 1411</span>&#160;    <span class="keywordflow">return</span> (LPWSTR)pT;   <span class="comment">// REVIEW, should this be const?</span></div>
<div class="line"><a name="l01412"></a><span class="lineno"> 1412</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01420">AddPathEllipsis()</a>.</p>

</div>
</div>
<a id="aa31ce455c47e43d3d4cb796dc59e47d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa31ce455c47e43d3d4cb796dc59e47d5">&#9670;&nbsp;</a></span>PSMTextOut()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PSMTextOut </td>
          <td>(</td>
          <td class="paramtype">HDC&#160;</td>
          <td class="paramname"><em>hdc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>xLeft</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>yTop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPWSTR&#160;</td>
          <td class="paramname"><em>lpsz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cch</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l01867">1867</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l01873"></a><span class="lineno"> 1873</span>&#160;{</div>
<div class="line"><a name="l01874"></a><span class="lineno"> 1874</span>&#160;    <span class="keywordtype">int</span> cx;</div>
<div class="line"><a name="l01875"></a><span class="lineno"> 1875</span>&#160;    LONG textsize, result;</div>
<div class="line"><a name="l01876"></a><span class="lineno"> 1876</span>&#160;    <span class="keyword">static</span> WCHAR achWorkBuffer[255];</div>
<div class="line"><a name="l01877"></a><span class="lineno"> 1877</span>&#160;    WCHAR *pchOut = achWorkBuffer;</div>
<div class="line"><a name="l01878"></a><span class="lineno"> 1878</span>&#160;    TEXTMETRICW textMetric;</div>
<div class="line"><a name="l01879"></a><span class="lineno"> 1879</span>&#160;    SIZE size;</div>
<div class="line"><a name="l01880"></a><span class="lineno"> 1880</span>&#160;    RECT rc;</div>
<div class="line"><a name="l01881"></a><span class="lineno"> 1881</span>&#160;    COLORREF color;</div>
<div class="line"><a name="l01882"></a><span class="lineno"> 1882</span>&#160; </div>
<div class="line"><a name="l01883"></a><span class="lineno"> 1883</span>&#160;    <span class="keywordflow">if</span> (cch &gt; <span class="keyword">sizeof</span>(achWorkBuffer)/<span class="keyword">sizeof</span>(WCHAR)) {</div>
<div class="line"><a name="l01884"></a><span class="lineno"> 1884</span>&#160;        pchOut = (WCHAR*)<a class="code" href="a00035.html#aa4c5df31e4454c1b801c9cc8dc49ed7f">UserRtlAllocMem</a>((cch+1) * <span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l01885"></a><span class="lineno"> 1885</span>&#160;        <span class="keywordflow">if</span> (pchOut == NULL)</div>
<div class="line"><a name="l01886"></a><span class="lineno"> 1886</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l01887"></a><span class="lineno"> 1887</span>&#160;    }</div>
<div class="line"><a name="l01888"></a><span class="lineno"> 1888</span>&#160; </div>
<div class="line"><a name="l01889"></a><span class="lineno"> 1889</span>&#160;    result = <a class="code" href="a03224.html#af7eb24aded300703b63d9542295f214f">GetPrefixCount</a>(lpsz, cch, pchOut, cch);</div>
<div class="line"><a name="l01890"></a><span class="lineno"> 1890</span>&#160; </div>
<div class="line"><a name="l01891"></a><span class="lineno"> 1891</span>&#160;    UserTextOutW(hdc, xLeft, yTop, pchOut,</div>
<div class="line"><a name="l01892"></a><span class="lineno"> 1892</span>&#160;                      cch - HIWORD(result));</div>
<div class="line"><a name="l01893"></a><span class="lineno"> 1893</span>&#160; </div>
<div class="line"><a name="l01894"></a><span class="lineno"> 1894</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01895"></a><span class="lineno"> 1895</span>&#160;<span class="comment">     * Any true prefix characters to underline?</span></div>
<div class="line"><a name="l01896"></a><span class="lineno"> 1896</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01897"></a><span class="lineno"> 1897</span>&#160;    <span class="keywordflow">if</span> (LOWORD(result) == 0xFFFF) {</div>
<div class="line"><a name="l01898"></a><span class="lineno"> 1898</span>&#160;        <span class="keywordflow">if</span> (pchOut != achWorkBuffer)</div>
<div class="line"><a name="l01899"></a><span class="lineno"> 1899</span>&#160;            <a class="code" href="a00035.html#a11e5f86f5ec24b989012a66ead19ac73">UserRtlFreeMem</a>(pchOut);</div>
<div class="line"><a name="l01900"></a><span class="lineno"> 1900</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l01901"></a><span class="lineno"> 1901</span>&#160;    }</div>
<div class="line"><a name="l01902"></a><span class="lineno"> 1902</span>&#160; </div>
<div class="line"><a name="l01903"></a><span class="lineno"> 1903</span>&#160;    <span class="keywordflow">if</span> (!UserGetTextMetricsW(hdc, &amp;textMetric)) {</div>
<div class="line"><a name="l01904"></a><span class="lineno"> 1904</span>&#160;        textMetric.tmOverhang = 0;</div>
<div class="line"><a name="l01905"></a><span class="lineno"> 1905</span>&#160;        textMetric.tmAscent = 0;</div>
<div class="line"><a name="l01906"></a><span class="lineno"> 1906</span>&#160;    }</div>
<div class="line"><a name="l01907"></a><span class="lineno"> 1907</span>&#160; </div>
<div class="line"><a name="l01908"></a><span class="lineno"> 1908</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01909"></a><span class="lineno"> 1909</span>&#160;<span class="comment">     * For proportional fonts, find starting point of underline.</span></div>
<div class="line"><a name="l01910"></a><span class="lineno"> 1910</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01911"></a><span class="lineno"> 1911</span>&#160;    <span class="keywordflow">if</span> (LOWORD(result) != 0) {</div>
<div class="line"><a name="l01912"></a><span class="lineno"> 1912</span>&#160; </div>
<div class="line"><a name="l01913"></a><span class="lineno"> 1913</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l01914"></a><span class="lineno"> 1914</span>&#160;<span class="comment">         * How far in does underline start (if not at 0th byte.).</span></div>
<div class="line"><a name="l01915"></a><span class="lineno"> 1915</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l01916"></a><span class="lineno"> 1916</span>&#160;        UserGetTextExtentPointW(hdc, pchOut, LOWORD(result), &amp;size);</div>
<div class="line"><a name="l01917"></a><span class="lineno"> 1917</span>&#160;        xLeft += size.cx;</div>
<div class="line"><a name="l01918"></a><span class="lineno"> 1918</span>&#160; </div>
<div class="line"><a name="l01919"></a><span class="lineno"> 1919</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l01920"></a><span class="lineno"> 1920</span>&#160;<span class="comment">         * Adjust starting point of underline if not at first char and there is</span></div>
<div class="line"><a name="l01921"></a><span class="lineno"> 1921</span>&#160;<span class="comment">         * an overhang.  (Italics or bold fonts.)</span></div>
<div class="line"><a name="l01922"></a><span class="lineno"> 1922</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l01923"></a><span class="lineno"> 1923</span>&#160;        xLeft = xLeft - textMetric.tmOverhang;</div>
<div class="line"><a name="l01924"></a><span class="lineno"> 1924</span>&#160;    }</div>
<div class="line"><a name="l01925"></a><span class="lineno"> 1925</span>&#160; </div>
<div class="line"><a name="l01926"></a><span class="lineno"> 1926</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01927"></a><span class="lineno"> 1927</span>&#160;<span class="comment">     * Adjust for proportional font when setting the length of the underline and</span></div>
<div class="line"><a name="l01928"></a><span class="lineno"> 1928</span>&#160;<span class="comment">     * height of text.</span></div>
<div class="line"><a name="l01929"></a><span class="lineno"> 1929</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01930"></a><span class="lineno"> 1930</span>&#160;    UserGetTextExtentPointW(hdc, pchOut + LOWORD(result), 1, &amp;size);</div>
<div class="line"><a name="l01931"></a><span class="lineno"> 1931</span>&#160;    textsize = size.cx;</div>
<div class="line"><a name="l01932"></a><span class="lineno"> 1932</span>&#160; </div>
<div class="line"><a name="l01933"></a><span class="lineno"> 1933</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01934"></a><span class="lineno"> 1934</span>&#160;<span class="comment">     * Find the width of the underline character.  Just subtract out the overhang</span></div>
<div class="line"><a name="l01935"></a><span class="lineno"> 1935</span>&#160;<span class="comment">     * divided by two so that we look better with italic fonts.  This is not</span></div>
<div class="line"><a name="l01936"></a><span class="lineno"> 1936</span>&#160;<span class="comment">     * going to effect embolded fonts since their overhang is 1.</span></div>
<div class="line"><a name="l01937"></a><span class="lineno"> 1937</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01938"></a><span class="lineno"> 1938</span>&#160;    cx = LOWORD(textsize) - textMetric.tmOverhang / 2;</div>
<div class="line"><a name="l01939"></a><span class="lineno"> 1939</span>&#160; </div>
<div class="line"><a name="l01940"></a><span class="lineno"> 1940</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01941"></a><span class="lineno"> 1941</span>&#160;<span class="comment">     * Get height of text so that underline is at bottom.</span></div>
<div class="line"><a name="l01942"></a><span class="lineno"> 1942</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01943"></a><span class="lineno"> 1943</span>&#160;    yTop += textMetric.tmAscent + 1;</div>
<div class="line"><a name="l01944"></a><span class="lineno"> 1944</span>&#160; </div>
<div class="line"><a name="l01945"></a><span class="lineno"> 1945</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01946"></a><span class="lineno"> 1946</span>&#160;<span class="comment">     * Draw the underline using the foreground color.</span></div>
<div class="line"><a name="l01947"></a><span class="lineno"> 1947</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01948"></a><span class="lineno"> 1948</span>&#160;    <a class="code" href="a00935.html#a479bbe69c871894f6ca23dfa237481ad">SetRect</a>(&amp;rc, xLeft, yTop, xLeft+cx, yTop+1);</div>
<div class="line"><a name="l01949"></a><span class="lineno"> 1949</span>&#160;    color = UserSetBkColor(hdc, UserGetTextColor(hdc));</div>
<div class="line"><a name="l01950"></a><span class="lineno"> 1950</span>&#160;    UserExtTextOutW(hdc, xLeft, yTop, ETO_OPAQUE, &amp;rc, TEXT(<span class="stringliteral">&quot;&quot;</span>), 0, NULL);</div>
<div class="line"><a name="l01951"></a><span class="lineno"> 1951</span>&#160;    UserSetBkColor(hdc, color);</div>
<div class="line"><a name="l01952"></a><span class="lineno"> 1952</span>&#160; </div>
<div class="line"><a name="l01953"></a><span class="lineno"> 1953</span>&#160;    <span class="keywordflow">if</span> (pchOut != achWorkBuffer) {</div>
<div class="line"><a name="l01954"></a><span class="lineno"> 1954</span>&#160;        <a class="code" href="a00035.html#a11e5f86f5ec24b989012a66ead19ac73">UserRtlFreeMem</a>(pchOut);</div>
<div class="line"><a name="l01955"></a><span class="lineno"> 1955</span>&#160;    }</div>
<div class="line"><a name="l01956"></a><span class="lineno"> 1956</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03224_source.html#l00761">GetPrefixCount()</a>, <a class="el" href="a00935_source.html#l00021">SetRect()</a>, <a class="el" href="a00035_source.html#l01064">UserRtlAllocMem()</a> , 以及 <a class="el" href="a00035_source.html#l01070">UserRtlFreeMem()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00779_source.html#l00053">_DrawState()</a>, <a class="el" href="a00206_source.html#l00073">ClientDrawState()</a>, <a class="el" href="a03224_source.html#l00997">DT_InitDrawTextInfo()</a> , 以及 <a class="el" href="a00248_source.html#l00402">xxxStaticPaint()</a>.</p>

</div>
</div>
<h2 class="groupheader">变量说明</h2>
<a id="a0f3be14607d7bb854fd013841856ebc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f3be14607d7bb854fd013841856ebc5">&#9670;&nbsp;</a></span>szEllipsis</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">WCHAR szEllipsis[] = TEXT(&quot;...&quot;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03224_source.html">rtl/drawtext.c</a> 第 <a class="el" href="a03224_source.html#l00046">46</a> 行定义.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03224_source.html#l01492">AddEllipsisAndDrawLine()</a>, <a class="el" href="a03224_source.html#l01420">AddPathEllipsis()</a> , 以及 <a class="el" href="a03224_source.html#l01311">NeedsEndEllipsis()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa00020_html_ae142b9698e40ef094e7481d595ddc9ae"><div class="ttname"><a href="a00020.html#ae142b9698e40ef094e7481d595ddc9ae">ghFontSys</a></div><div class="ttdeci">HFONT ghFontSys</div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00101">clglobal.c:101</a></div></div>
<div class="ttc" id="aa03224_html_a02d920d30320f1aa0e9ef66ef1fc6117"><div class="ttname"><a href="a03224.html#a02d920d30320f1aa0e9ef66ef1fc6117">DT_InitDrawTextInfo</a></div><div class="ttdeci">BOOL DT_InitDrawTextInfo(HDC hdc, LPRECT lprc, UINT wFormat, LPDRAWTEXTDATA lpDrawInfo, LPDRAWTEXTPARAMS lpDTparams)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00997">rtl/drawtext.c:997</a></div></div>
<div class="ttc" id="aa03224_html_ab132e22217cfdd047e85f4650e851147"><div class="ttname"><a href="a03224.html#ab132e22217cfdd047e85f4650e851147">DT_HFMTMASK</a></div><div class="ttdeci">#define DT_HFMTMASK</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00018">rtl/drawtext.c:18</a></div></div>
<div class="ttc" id="aa00371_html_a01c4659626880ba56745765a3580a36b"><div class="ttname"><a href="a00371.html#a01c4659626880ba56745765a3580a36b">RIPMSG0</a></div><div class="ttdeci">#define RIPMSG0(flags, szFmt)</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00131">winerrp.h:131</a></div></div>
<div class="ttc" id="aa00035_html_aa4c5df31e4454c1b801c9cc8dc49ed7f"><div class="ttname"><a href="a00035.html#aa4c5df31e4454c1b801c9cc8dc49ed7f">UserRtlAllocMem</a></div><div class="ttdeci">PVOID UserRtlAllocMem(ULONG uBytes)</div><div class="ttdef"><b>Definition:</b> <a href="a00035_source.html#l01064">clinit.c:1064</a></div></div>
<div class="ttc" id="aa03224_html_a17ac4a763de37779b30785dfab165bd3"><div class="ttname"><a href="a03224.html#a17ac4a763de37779b30785dfab165bd3">GetNextWordbreak</a></div><div class="ttdeci">LPCWSTR GetNextWordbreak(DWORD dwCodePage, LPCWSTR lpch, LPCWSTR lpchEnd, BOOL fBreakSpace)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00649">rtl/drawtext.c:649</a></div></div>
<div class="ttc" id="aa03224_html_a876ce77f3c672c7162658151e648389e"><div class="ttname"><a href="a03224.html#a876ce77f3c672c7162658151e648389e">CR</a></div><div class="ttdeci">#define CR</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00016">rtl/drawtext.c:16</a></div></div>
<div class="ttc" id="aa03224_html_adb66e3ffa3f7a55c481165ca226efa3e"><div class="ttname"><a href="a03224.html#adb66e3ffa3f7a55c481165ca226efa3e">IsSysFontAndDefaultMode</a></div><div class="ttdeci">BOOL IsSysFontAndDefaultMode(HDC hdc)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l01971">rtl/drawtext.c:1971</a></div></div>
<div class="ttc" id="aa00941_html_a7969a74763219acebef29e9d4d64ab58"><div class="ttname"><a href="a00941.html#a7969a74763219acebef29e9d4d64ab58">UserIsFullWidth</a></div><div class="ttdeci">BOOL UserIsFullWidth(DWORD dwCodePage, WCHAR wChar)</div></div>
<div class="ttc" id="aa00935_html_a479bbe69c871894f6ca23dfa237481ad"><div class="ttname"><a href="a00935.html#a479bbe69c871894f6ca23dfa237481ad">SetRect</a></div><div class="ttdeci">BOOL APIENTRY SetRect(LPRECT prc, int left, int top, int right, int bottom)</div><div class="ttdef"><b>Definition:</b> <a href="a00935_source.html#l00021">rect.c:21</a></div></div>
<div class="ttc" id="aa03224_html_af7eb24aded300703b63d9542295f214f"><div class="ttname"><a href="a03224.html#af7eb24aded300703b63d9542295f214f">GetPrefixCount</a></div><div class="ttdeci">LONG GetPrefixCount(LPCWSTR lpstr, int cch, LPWSTR lpstrCopy, int charcopycount)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00761">rtl/drawtext.c:761</a></div></div>
<div class="ttc" id="aa00035_html_a11e5f86f5ec24b989012a66ead19ac73"><div class="ttname"><a href="a00035.html#a11e5f86f5ec24b989012a66ead19ac73">UserRtlFreeMem</a></div><div class="ttdeci">VOID UserRtlFreeMem(PVOID pMem)</div><div class="ttdef"><b>Definition:</b> <a href="a00035_source.html#l01070">clinit.c:1070</a></div></div>
<div class="ttc" id="aa03224_html_adb629223ee858bf3b4cf3b7b31d1f931"><div class="ttname"><a href="a03224.html#adb629223ee858bf3b4cf3b7b31d1f931">MAXBUFFSIZE</a></div><div class="ttdeci">#define MAXBUFFSIZE</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00057">rtl/drawtext.c:57</a></div></div>
<div class="ttc" id="aa00941_html_acc0cc89d3e9afc8f6308f08c48f27f4f"><div class="ttname"><a href="a00941.html#acc0cc89d3e9afc8f6308f08c48f27f4f">UserGetCodePage</a></div><div class="ttdeci">DWORD UserGetCodePage(HDC hdc)</div></div>
<div class="ttc" id="aa03224_html_a2a0321e98ac1eef74c1fc4d7b0ecc269"><div class="ttname"><a href="a03224.html#a2a0321e98ac1eef74c1fc4d7b0ecc269">PathFindFileName</a></div><div class="ttdeci">LPWSTR PathFindFileName(LPCWSTR pPath, int cchText)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l01402">rtl/drawtext.c:1402</a></div></div>
<div class="ttc" id="aa03224_html_ac4eec820aaba00887637766df1ebccbd"><div class="ttname"><a href="a03224.html#ac4eec820aaba00887637766df1ebccbd">AddEllipsisAndDrawLine</a></div><div class="ttdeci">int AddEllipsisAndDrawLine(HDC hdc, int yLine, LPCWSTR lpchText, int cchText, DWORD dwDTformat, LPDRAWTEXTDATA lpDrawInfo)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l01492">rtl/drawtext.c:1492</a></div></div>
<div class="ttc" id="aa03224_html_a0f90df0386382ac0cd9b7849cd91e0ec"><div class="ttname"><a href="a03224.html#a0f90df0386382ac0cd9b7849cd91e0ec">CCHELLIPSIS</a></div><div class="ttdeci">#define CCHELLIPSIS</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00049">rtl/drawtext.c:49</a></div></div>
<div class="ttc" id="aa03224_html_a903d0804dbfff266d1210cdcd9a91b07"><div class="ttname"><a href="a03224.html#a903d0804dbfff266d1210cdcd9a91b07">AddPathEllipsis</a></div><div class="ttdeci">int AddPathEllipsis(HDC hDC, LPWSTR lpszPath, int cchText, UINT wFormat, int cxMaxWidth, int iOverhang)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l01420">rtl/drawtext.c:1420</a></div></div>
<div class="ttc" id="aa03025_html"><div class="ttname"><a href="a03025.html">DRAWTEXTDATA</a></div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00029">rtl/drawtext.c:29</a></div></div>
<div class="ttc" id="aa00371_html_ae61d954062a9ece52e350e54cad9a23d"><div class="ttname"><a href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a></div><div class="ttdeci">#define RIPERR0(idErr, flags, szFmt)</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00119">winerrp.h:119</a></div></div>
<div class="ttc" id="aa03224_html_a350c9d6cb81908d59427ee96844d1a9c"><div class="ttname"><a href="a03224.html#a350c9d6cb81908d59427ee96844d1a9c">LF</a></div><div class="ttdeci">#define LF</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00017">rtl/drawtext.c:17</a></div></div>
<div class="ttc" id="aa03224_html_af62cc60e4e13ee2561c02fc3a68fda26"><div class="ttname"><a href="a03224.html#af62cc60e4e13ee2561c02fc3a68fda26">LPFNTEXTDRAW</a></div><div class="ttdeci">void(FAR * LPFNTEXTDRAW)(HDC, int, int, LPWSTR, int)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00027">rtl/drawtext.c:27</a></div></div>
<div class="ttc" id="aa00563_html_a074685e97e89d6aa2accdfcb82328699"><div class="ttname"><a href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a></div><div class="ttdeci">ddeml v[i&lt; inst &gt;][t&lt; type &gt;][hObj|pObj] Dump DDEML state information ddeml lists all ddeml instances for this process n ddeml t&lt; type &gt; lists all ddeml objects of the given type n n assumes link is first DWORD</div><div class="ttdef"><b>Definition:</b> <a href="a00563_source.html#l00175">exts.h:175</a></div></div>
<div class="ttc" id="aa03224_html_a05adba5e1573b32335f8496037f88441"><div class="ttname"><a href="a03224.html#a05adba5e1573b32335f8496037f88441">DT_DrawStr</a></div><div class="ttdeci">int DT_DrawStr(HDC hdc, int xLeft, int yTop, LPCWSTR lpchStr, int cchCount, BOOL fDraw, UINT wFormat, LPDRAWTEXTDATA lpDrawInfo)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00900">rtl/drawtext.c:900</a></div></div>
<div class="ttc" id="aa03224_html_a0f3be14607d7bb854fd013841856ebc5"><div class="ttname"><a href="a03224.html#a0f3be14607d7bb854fd013841856ebc5">szEllipsis</a></div><div class="ttdeci">static WCHAR szEllipsis[]</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00046">rtl/drawtext.c:46</a></div></div>
<div class="ttc" id="aa00371_html_a41f433389f20db57f042022a662e96de"><div class="ttname"><a href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a></div><div class="ttdeci">#define RIP_WARNING</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00029">winerrp.h:29</a></div></div>
<div class="ttc" id="aa00941_html_abf3730a9dfc3b1651f028907e43cb865"><div class="ttname"><a href="a00941.html#abf3730a9dfc3b1651f028907e43cb865">UserIsFELineBreak</a></div><div class="ttdeci">BOOL UserIsFELineBreak(DWORD dwCodePage, WCHAR wChar)</div></div>
<div class="ttc" id="aa03224_html_a7072070208c274ab4d8612e98cdb297d"><div class="ttname"><a href="a03224.html#a7072070208c274ab4d8612e98cdb297d">DT_DrawJustifiedLine</a></div><div class="ttdeci">void DT_DrawJustifiedLine(HDC hdc, int yTop, LPCWSTR lpchLineSt, int cchCount, UINT wFormat, LPDRAWTEXTDATA lpDrawInfo)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00960">rtl/drawtext.c:960</a></div></div>
<div class="ttc" id="aa03224_html_aa31ce455c47e43d3d4cb796dc59e47d5"><div class="ttname"><a href="a03224.html#aa31ce455c47e43d3d4cb796dc59e47d5">PSMTextOut</a></div><div class="ttdeci">void PSMTextOut(HDC hdc, int xLeft, int yTop, LPWSTR lpsz, int cch)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l01867">rtl/drawtext.c:1867</a></div></div>
<div class="ttc" id="aa03224_html_afaad18d6511aeb4e5f0f2e6b9db4bdea"><div class="ttname"><a href="a03224.html#afaad18d6511aeb4e5f0f2e6b9db4bdea">DT_AdjustWhiteSpaces</a></div><div class="ttdeci">LPCWSTR DT_AdjustWhiteSpaces(LPCWSTR lpStNext, LPINT lpiCount, UINT wFormat)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l01131">rtl/drawtext.c:1131</a></div></div>
<div class="ttc" id="aa03224_html_a372cd9491d5e2afd7f98e57f68dfd905"><div class="ttname"><a href="a03224.html#a372cd9491d5e2afd7f98e57f68dfd905">DT_BreakAWord</a></div><div class="ttdeci">LPCWSTR DT_BreakAWord(HDC hdc, LPCWSTR lpchText, int iLength, int iWidth, UINT wFormat, int iOverhang)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l01170">rtl/drawtext.c:1170</a></div></div>
<div class="ttc" id="aa02513_html_a4bd85c2f52f502cc32a9bfb9004694ad"><div class="ttname"><a href="a02513.html#a4bd85c2f52f502cc32a9bfb9004694ad">tagSERVERINFO::tmSysFont</a></div><div class="ttdeci">TEXTMETRIC tmSysFont</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01017">user.h:1017</a></div></div>
<div class="ttc" id="aa03224_html_a4e04593ff1f3b6675984ed4fa4b27f43"><div class="ttname"><a href="a03224.html#a4e04593ff1f3b6675984ed4fa4b27f43">DT_GetExtentMinusPrefixes</a></div><div class="ttdeci">int DT_GetExtentMinusPrefixes(HDC hdc, LPCWSTR lpchStr, int cchCount, UINT wFormat, int iOverhang)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00866">rtl/drawtext.c:866</a></div></div>
<div class="ttc" id="aa03608_html_afd1a0e78d1f88954d93e48ab3821781f"><div class="ttname"><a href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a></div><div class="ttdeci">typedef UINT(FAR WINAPI *MSGSOUNDPROC)()</div></div>
<div class="ttc" id="aa00371_html_adbdd8355d15a97b6f3a9e4766e6a2cc1"><div class="ttname"><a href="a00371.html#adbdd8355d15a97b6f3a9e4766e6a2cc1">RIPERR1</a></div><div class="ttdeci">#define RIPERR1(idErr, flags, szFmt, p1)</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00120">winerrp.h:120</a></div></div>
<div class="ttc" id="aa03224_html_a44d8495062e6993b1d8061e8cfa5488d"><div class="ttname"><a href="a03224.html#a44d8495062e6993b1d8061e8cfa5488d">DT_GetLineBreak</a></div><div class="ttdeci">LPWSTR DT_GetLineBreak(HDC hdc, LPCWSTR lpchLineStart, int cchCount, DWORD dwFormat, LPINT lpiLineLength, LPDRAWTEXTDATA lpDrawInfo)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l01201">rtl/drawtext.c:1201</a></div></div>
<div class="ttc" id="aa00020_html_ad760da1dd81d9e84dee607d18edfde39"><div class="ttname"><a href="a00020.html#ad760da1dd81d9e84dee607d18edfde39">gpsi</a></div><div class="ttdeci">PSERVERINFO gpsi</div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00039">clglobal.c:39</a></div></div>
<div class="ttc" id="aa03224_html_aed2de8c9634b17416e68c4fda014df94"><div class="ttname"><a href="a03224.html#aed2de8c9634b17416e68c4fda014df94">NeedsEndEllipsis</a></div><div class="ttdeci">BOOL NeedsEndEllipsis(HDC hdc, LPCWSTR lpchText, LPINT lpCount, LPDRAWTEXTDATA lpDTdata, UINT wFormat)</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l01311">rtl/drawtext.c:1311</a></div></div>
<div class="ttc" id="aa03224_html_aeb5bdb8d54a29d011af789fac970c7f3"><div class="ttname"><a href="a03224.html#aeb5bdb8d54a29d011af789fac970c7f3">LPDRAWTEXTDATA</a></div><div class="ttdeci">DRAWTEXTDATA FAR * LPDRAWTEXTDATA</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00044">rtl/drawtext.c:44</a></div></div>
<div class="ttc" id="aa02513_html_a481a03e7eb24994f1eca28391f9b7c77"><div class="ttname"><a href="a02513.html#a481a03e7eb24994f1eca28391f9b7c77">tagSERVERINFO::cySysFontChar</a></div><div class="ttdeci">int cySysFontChar</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01014">user.h:1014</a></div></div>
<div class="ttc" id="aa03224_html_a51bb95844094a47a8b877c21c4201ca9"><div class="ttname"><a href="a03224.html#a51bb95844094a47a8b877c21c4201ca9">DT_VFMTMASK</a></div><div class="ttdeci">#define DT_VFMTMASK</div><div class="ttdef"><b>Definition:</b> <a href="a03224_source.html#l00019">rtl/drawtext.c:19</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_d1396aa20fcbba3cbb80fda211a2145f.html">rtl</a></li><li class="navelem"><a class="el" href="a03224.html">drawtext.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
